Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can do this using <code>UIKeyboardWillShowNotification</code> look into <a href="http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWindow_Class/UIWindowClassReference/UIWindowClassReference.html#//apple_ref/c/data/UIKeyboardWillShowNotification" rel="nofollow">UIWindow reference</a> for information about it :</p> <pre><code>[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil]; </code></pre> <p>This notification is raised when a textfield <strong><em>even from</em> a <code>UIWebView</code></strong> is selected.</p> <p>Look at Apple <a href="http://developer.apple.com/library/ios/#samplecode/KeyboardAccessory/Introduction/Intro.html" rel="nofollow"><strong>KeyboardAccessory</strong></a> Sample code which shows how to do this. That sample code use the UITextXxxx <code>inputAccessoryView</code> property, that I doubt you will be able to use. But the notification will give you enough information to add your accessory directly in your view or even on top UIWindow, and that even by animating it with the keyboard :</p> <pre><code>(gdb) po notification NSConcreteNotification 0xb5a2190 {name = UIKeyboardWillShowNotification; userInfo = { UIKeyboardAnimationCurveUserInfoKey = 0; UIKeyboardAnimationDurationUserInfoKey = "0.300000011920929"; UIKeyboardBoundsUserInfoKey = "NSRect: {{0, 0}, {320, 260}}"; UIKeyboardCenterBeginUserInfoKey = "NSPoint: {160, 610}"; UIKeyboardCenterEndUserInfoKey = "NSPoint: {160, 350}"; UIKeyboardFrameBeginUserInfoKey = "NSRect: {{0, 480}, {320, 260}}"; UIKeyboardFrameEndUserInfoKey = "NSRect: {{0, 220}, {320, 260}}"; }} </code></pre>
 

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