Check for split keyboard

后端 未结 4 1491
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-13 11:08

As many of you know iOS 5 introduced a slick split keyboard for thumb-typing. Unfortunately, I have some UI that is dependent on the normal full-screen keyboard layout. One

4条回答
  •  被撕碎了的回忆
    2020-12-13 11:40

    When the keyboard is docked, UIKeyboardWillShowNotification will be raised. If the keyboard is split or undocked, no keyboard notifications are raised.

    If a keyboard is docked, UIKeyboardWillShowNotification will be raised, and the following will be true:

    [[[notification userInfo] valueForKey:@"UIKeyboardFrameChangedByUserInteraction"] intValue] == 1
    

    If a keyboard is undocked, UIKeyboardWillHideNotification will be raised, and the above statement will also be true.

    Using this information has been adequate for me to code my user interface.

    Note: this might be a violation of Apple's guidelines, I'm not sure.

提交回复
热议问题