Masterminder
Masterminder

Reputation: 1135

Disabling the keyboard interaction in a Text View in iOS5, XCode 4.3.2

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

Answers (2)

Nvork
Nvork

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

Luke Rowland
Luke Rowland

Reputation: 26

I think it's in the inspector isn't it?

Upvotes: 1

Related Questions