简体   繁体   中英

How can I detect if the height of the keyboard has changed in iOS 8?

On iOS 8, keyboards can be different heights. When the user switches between keyboards, or changes the height of the current keyboard, how can I detect this?

Listen to the UIKeyboardWillChangeFrameNotification notification.

Use UIKeyboardFrameBeginUserInfoKey and UIKeyboardFrameEndUserInfoKey values in the passed userInfo dictionary to retrieve the current and future frame of the keyboard.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM