Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Allow user to select text from UILabel to copy [duplicate]

I have a UILabel, but how can I allow the user to select a portion of it's text. I don't want the user to be able to edit the text nor the label/textfield to have a border.

like image 270
Jonathan. Avatar asked Nov 03 '10 19:11

Jonathan.


1 Answers

It is not possible with UILabel.

You should use UITextView for that. Just disable editing using textFieldShouldBeginEditing delegate method.

like image 115
Yuras Avatar answered Sep 28 '22 14:09

Yuras