Reputation: 107
i have a uitextfield and some text on it, i want to know how to create a code that my user touch the field and can copy the txt to use for something else. my uitextfiled.enable = no; thanks
Upvotes: 1
Views: 1212
Reputation: 1496
I you are able to use UITextField
class instead you could set the editable
property to NO
. Selecting text will still be possible.
Upvotes: 0
Reputation: 2382
As far as the copying goes, you need to check out the UIPasteboard Class. Using that class, you can put text onto the pasteboard very easily.
For not enabling the text field, you can simply leave it disabled, but capture the touch event anyway.
For the pasteboard, try going through this tutorial.
Upvotes: 1