Reputation: 1135
Can someone please tell me how to disable the keyboard in a Text View? Whenever I click on words, the keyboard pops up and I am able to manipulate my original text. I just want it to be selectable, so you can copy, paste. I prefer this to be disabled for the whole app. If someone could tell me how and where to implement this I would really appreciate it.
ThX
Upvotes: 0
Views: 884
Reputation: 131
For disabling using code, use the below given code.
Inherit UITextFieldDelegate protocol In your view controller add the text
@interface YourViewController () <UITextViewDelegate>
In viewDidLoad set yourself as a delegate:
yourUITextView.delegate = self;
Implement the delegate method below:
- (BOOL)textViewShouldBeginEditing:(UITextView *)textView
{
return NO;
}
Upvotes: 0