1

I want to get all text selectable whenever user clicks on textview (objective c), I have tried the following code in textViewDidBeginEditing method but it is not working for me.

[textView selectAll:nil];

Can anyone help?

Harsh
  • 63
  • 9
  • https://stackoverflow.com/questions/1689911/programmatically-select-all-text-in-uitextfield and https://stackoverflow.com/questions/26307436/uitextview-selectall-method-not-working-as-expected – arpita Nov 14 '17 at 07:04
  • Possible duplicate of [UITextView selectAll method not working as expected](https://stackoverflow.com/questions/26307436/uitextview-selectall-method-not-working-as-expected) – Antony Raphel Nov 14 '17 at 07:10
  • @arpita yes, I had gone through those links too, but they didn't work for me. :( – Harsh Nov 14 '17 at 07:20
  • @AntonyRaphel actually I am using custom classes for text view, but I checked those classes, didn't get any code for selection of text. – Harsh Nov 14 '17 at 07:21
  • https://stackoverflow.com/questions/12403538/how-to-make-uitextview-text-all-selectable-and-show-copy-option-to-the-user-ipho. try this – arpita Nov 14 '17 at 07:25

0 Answers0