View Full Version : How do I determine the keyboard size
mriddle
Jun 18, 2009, 09:01 PM
I'd like to make my program's view layout take into account the keyboard when it is visible - How can I determine its current height in both portrait and landscape mode from an API function? I'd rather not make guesses or hard code sizes.
Jeremy1026
Jun 18, 2009, 09:10 PM
The keyboard dimensions are listed in the documentation. You just have to translate your view to move to support the keyboard.
kainjow
Jun 18, 2009, 09:22 PM
Subscribe to the UIKeyboardDidShowNotification/UIKeyboardDidHideNotification notifications and then you can grab the UIKeyboardBoundsUserInfoKey value from the NSNotification's userInfo.
mriddle
Jun 21, 2009, 11:38 PM
The notification gave me the information in the way I wanted it - thank you.
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.