Reputation: 21
I'd like to disable UITextField's keyboard without hidding. is it possible? If it's so, could you show me how to do?
thanx
Carsh
Upvotes: 2
Views: 190
Reputation: 6065
I did not try but this should work:
textField.inputView.userInteractionEnabled = NO;
Upvotes: 0
Reputation: 993
a haha , i have a very very ugly method. you can creat a view whichs frame = the keyboards frame. [view setBackgroundColor:[UIColor clearColor]]; [self addSubviews:view];
Upvotes: 0
Reputation: 6065
if you implement delegate method of uitextfield
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField
{
return NO;
}
It does not show the keyboard.
Upvotes: 2
Reputation: 1155
I don't believe the UIKeyboard can be disabled without hiding it.
If you'd like to disable user interaction with the keyboard, you could add an extra UIWindow on top of your existing windows.
By overlaying the UIKeyboard with a transparent UIWindow, the user would be able to see the keyboard, without interacting with it.
Upvotes: 0