Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 465
dragosaur Avatar asked Sep 16 '14 20:09

dragosaur


1 Answers

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.

like image 191
Léo Natan Avatar answered Sep 28 '22 02:09

Léo Natan