How to prevent the keyboard from showing (not firing) on ​​the TextView?

I would like to know how to disable (not how to fire) an iOS keyboard in a TextView. I don’t even want the keyboard to appear when the user touches the TextView.

All the examples I found are to make the keyboard disappear AFTER the appearance.

The closest I got is to set textView.userInteractionEnabled = NO; but it also eliminates scrolling ( I want to keep scrolling ).

Thanks in advance!

+4
source share
1 answer

Try implementing the following method in a text view delegate:

- (BOOL)textViewShouldBeginEditing:(UITextView *)textView{ return NO; } 
+6
source

All Articles