简体   繁体   English

在Objective-C中获取突出显示的文本

[英]Get a highlighted text in objective-c

I'm trying to get the StringValue of any text (Out side my application) that has been selected by the cursor. 我试图获取由光标选择的任何文本(在应用程序之外)的StringValue。 I tried checking on NSControl class,but i didn't find anything useful. 我尝试检查NSControl类,但没有发现任何有用的东西。

[UIPasteboard generalPasteboard].string

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM