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

mriddle

macrumors newbie
Original poster
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.