Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Subscribe to the <a href="http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWindow_Class/UIWindowClassReference/UIWindowClassReference.html" rel="nofollow">UIKeyboardWillShowNotification</a>, <a href="http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWindow_Class/UIWindowClassReference/UIWindowClassReference.html" rel="nofollow">UIKeyboardWillHideNotification</a> notifications using <a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/nsnotificationcenter_Class/Reference/Reference.html" rel="nofollow">NSNotificationCenter</a>, and use a <a href="http://developer.apple.com/library/ios/#documentation/uikit/reference/UIScrollView_Class/Reference/UIScrollView.html" rel="nofollow">UIScrollView</a> to allow the user to scroll down. Set the UIScrollView contentSize property to your normal full frame, and resize the scroll view's frame as the keyboard appears and disappears. The size and animation duration of the keyboard can be obtained using this code in the method handling UIKeyboardWillShow/HideNotifications:</p> <pre><code>NSDictionary *userInfo = [notification userInfo]; NSValue *keyboardBoundsValue = [userInfo objectForKey:UIKeyboardFrameEndUserInfoKey]; [keyboardBoundsValue getValue:&amp;keyboardBounds]; NSValue* value = [userInfo objectForKey:UIKeyboardAnimationDurationUserInfoKey]; NSTimeInterval duration = 0; [value getValue:&amp;duration]; </code></pre> <p>Another tip for handling these cases - when you rotate the device, you will receive both notifications (hide+show) in very quick succession.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload