I have view with text field -- subclassed from UIAlertView. In the textFieldShouldReturn delegate I call resignFirstResponder for text field and dismissWithClickedButtonIndex for view. On the 3.x version everything fine, but on 4.0 keyboard still present on screen after view dismissing and doesn't disappear while app running. App compiled for 3.0 target and tested on 4.0 iPhone OS. One more thing - sometimes after dismissing alert - Done button on the keyboard replaces with Return button.. Any suggestions ?
0
votes
2 Answers
0
votes
Strange thing.. I wrote functions to find and animate out keyboard view by timer but keyboard can't be found while it present on the screen.. Something like this:
for( UIWindow *keyboardWindow in [[UIApplication sharedApplication] windows] ){
for( UIView *keyboard in [keyboardWindow subviews] ){
NSString *desc = [keyboard description];
if( [desc hasPrefix:@"<UIKeyboard"]==YES ) {
// animate out
}
}
}