Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mriddle

macrumors newbie
Original poster
Jun 18, 2009
2
0
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.
 
The keyboard dimensions are listed in the documentation. You just have to translate your view to move to support the keyboard.
 
Subscribe to the UIKeyboardDidShowNotification/UIKeyboardDidHideNotification notifications and then you can grab the UIKeyboardBoundsUserInfoKey value from the NSNotification's userInfo.
 
Thanks

The notification gave me the information in the way I wanted it - thank you.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.