views:

20

answers:

1

Say you've got a UITextView populated with a chunk of text. When a user taps on a word within the text I want the app to copy (retrieve the string) that word immediately. In your knowledge, is there any practical way to do this?

Side note: I looked at UIPasteboard and all that but it is NOT what I'm looking for as it does not offer a one-tap solution. Central aim here is the concept of one-tap. I.e. Tap the text once and I retrieve the NSString.

A: 

I know you looked at UIPasteboard, but did you consider playing around with detecting touches and then setting the [textView text] yourself with setValue:forPasteboardType:?

kevboh
I did have a look at setValue:forPasteboardType: but I don't get how that helps my problem?
Eric