UIKeyboardWillShowNotification not called for an undocked keyboard in iOS 5

后端 未结 2 420
失恋的感觉
失恋的感觉 2021-01-01 23:37

I have found that UIKeyboardWillShowNotification and UIKeyboardDidShowNotification are not generated when an undocked/split keyboard appears in

相关标签:
2条回答
  • 2021-01-01 23:53

    If the keyboard appears undocked / split, you don't need to detect it. The whole point of the undocked / split keyboard is that the user can move it freely if it's in the way.

    0 讨论(0)
  • 2021-01-02 00:01

    You need to observe UIKeyboardWillChangeFrameNotification and UIKeyboardDidChangeFrameNotification instead. When you get them, you can look at the value for UIKeyboardFrameEndUserInfoKey (if it exists, it doesn't always while dragging the keyboard) and see if that rect intersects the window to see if the keyboard is now on or off screen.

    0 讨论(0)
提交回复
热议问题