Making a UITextView not editable by the user

Peter V picture Peter V · Sep 6, 2011 · Viewed 33.4k times · Source

I made this UITextView and everything is perfect except the fact that when the user taps it, the keyboard opens up. How can I disable that "editing(?)" option?
Here's the code:

- (void)loadAboutStable {
UITextView *aboutStable = [[UITextView alloc] init];
[aboutStable setText:@"Please check Your network connection"];
[self addSubview:aboutStable];}

Answer

James Webster picture James Webster · Sep 6, 2011

[aboutStable setUserInteractionEnabled:NO] should do it

and if you still need scrolling:

aboutStable.editable = NO;