NSInteralInconsistencyException - UIKeyboardLayoutAlignmentView

前端 未结 4 2135
旧时难觅i
旧时难觅i 2020-12-06 04:42

I am getting the follow crash in my reports but I don\'t have a clue as to where to start looking! - any help appreciated. I have no calls or reference to UIKeyboardLayoutA

4条回答
  •  我在风中等你
    2020-12-06 04:59

    This is definitely a bug with iOS8.3 when showing a UIAlertView or UIAlertController when the keyboard is already shown.

    A workaround is to assign the alert view's textfield as the first responder. This works better than hiding the keyboard via resignFirstResponder or endEditing because the keyboard won't flicker.

    UIAlertView *alertView = [[UIAlertView alloc] initWithTitle.......
    alertView.alertViewStyle = UIAlertViewStylePlainTextInput;
    
    UITextField *txtEmail = [alertView textFieldAtIndex:0];
    [txtEmail becomeFirstResponder];
    
    [alertView show];
    

提交回复
热议问题