我试图在使用 UIMenuController 执行操作时获取选定的文本。如何取出选定的文本?我目前正在使用 UIWebView,但希望有一个通用的解决方案(如果有)。
您应该能够从以下位置获取数据UIPasteboard。应该是这样的[UIPasteboard generalPasteboard].string对于文本。
UIPasteboard
[UIPasteboard generalPasteboard].string