codeetcetera
codeetcetera

Reputation: 3203

Getting selected text from UIMenuController

I'm trying to get the selected text when performing actions with a UIMenuController. How do I get the selected text out? I'm using a UIWebView at the moment, but would like a universal solution if there is one.

Upvotes: 3

Views: 2490

Answers (1)

Deepak Danduprolu
Deepak Danduprolu

Reputation: 44633

You should be able to get the data from UIPasteboard. It should be something like [UIPasteboard generalPasteboard].string for text.

Upvotes: 4

Related Questions