I have an animation, during which I want to disable the keyboard but not hide it. I even tried self.view.userInteractionEnabled = NO;
, but that hides the keyboard. I guess it must call resignFirstResponder
.
Asked
Active
Viewed 1,175 times
1

ma11hew28
- 121,420
- 116
- 450
- 651
-
hi Matt, do you have resolved this problem?? can u share it in this page? thank you – R. Dewi May 19 '11 at 03:28
-
Yes: http://stackoverflow.com/a/23699811/242933 – ma11hew28 May 16 '14 at 16:07
2 Answers
1
To disable everything, you can use
[[UIApplication sharedApplication] beginIgnoringInteractionEvents];
right before you start the animation and
[[UIApplication sharedApplication] endIgnoringInteractionEvents];
after the animation finishes, e.g., in its completion block.

ma11hew28
- 121,420
- 116
- 450
- 651
0
You can disable the keyboard without dismissing it by doing:
NSArray *windows = [UIApplication sharedApplication].windows;
if ([windows count] > 1) {
UIWindow *keyboardWindow = windows[1];
keyboardWindow.userInteractionEnabled = NO;
}
But, it's obviously very hackish & fragile, and I'm not sure if it complies with Apple's terms.

ma11hew28
- 121,420
- 116
- 450
- 651