1

我想在 FirstResponder 更改时收到 UIKeyboard 通知(两个 UITextField),以便进行一些编码以防止 UIKeyboard 覆盖我的 UITextField。但是当键盘的大小没有更改时没有发布 UIKeyboard 通知(我试图接收这些通知:UIKeyboardWillShowNotification,,, )。当键盘的大小发生变化时UIKeyboardWillHideNotificationUIKeyboardWillChangeFrameNotification我收到了几个 UIKeyboard 通知。我错过了什么吗?

4

1 回答 1

0
  1. 更改时不会UIKeyboardNotification发布。FirstResponse
  2. UIKeyboardNotification将随UIKeyboardFrame键盘大小变化时发布。

这是一个简单的解决方案:将 存储UIKeyboardFrame在一个属性中,然后在更改并显示scrollContentView时发送您的消息(由您自己实现)。FirstResponseUIKeyboard

于 2013-07-20T06:20:28.417 回答