After searching for a long time, I found 2 explanations for the same.
1. Its a bug!
2. Its a feature! Apple kept it that way to avoid the keyboard coming up and going down when switching between input elements in the modal form. B******T!
So the workaround I came up with is:
- (BOOL)textViewShouldEndEditing:(UITextView *)textView {
NSArray *arrWindows = [[UIApplication sharedApplication] windows];
if ([arrWindows count] > 1) {
UIWindow *keyboardWindow = [arrWindows objectAtIndex:1];
[keyboardWindow setHidden:YES];
}
return YES;
}
2 comments:
Hello!
Where I have the same issue.
Please tell me where do I put this code?
Thank you!
Sorry, but this was done a long time back and I am not sure if this is still applicable.
Post a Comment