Keyboard pops up after UIAlertView is dismissed on iOS 8.3 for iPad

前端 未结 7 1327
小鲜肉
小鲜肉 2021-01-31 03:15

With the latest iOS 8.3 release, our app starts to have a weird behavior.

After finishing textfield editing, the user can click the close button which brings up an

7条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-31 03:38

    I too, had a keyboard popping up (with the cursor in the last-used textView) after closing a UIAlertController and here is a very simple fix:

    Immediately before building and presenting the UIAlertController,

    Using [_activeTextView resignFirstResponder]; the keyboard will reappear. Using [self.view endEditing:YES]; the keyboard will NOT reappear.

    I hope this helps you.

提交回复
热议问题