Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I can't point you at a working example, but I believe what you're looking for is here <a href="http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIKeyInput_Protocol/Reference/Reference.html#//apple_ref/occ/intf/UIKeyInput" rel="noreferrer">http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIKeyInput_Protocol/Reference/Reference.html#//apple_ref/occ/intf/UIKeyInput</a></p> <p>The basic idea is that you implement the <code>UIKeyInput</code> protocol on a <code>UIResponder</code> object, such as a <code>UIView</code>. Make the view the firstResponder and the keyboard should automatically appear. The <code>UIKeyInput</code> protocol gives you simple feedback for inserting a character and deleting a character when the user presses buttons on the keyboard.</p> <p>This isn't working code, but it would look something like this:</p> <pre><code>@interface MyKeyboardView : UIView &lt;UIKeyInput&gt; @end @implementation MyKeyboardView - (void)insertText:(NSString *)text { // Do something with the typed character } - (void)deleteBackward { // Handle the delete key } - (BOOL)hasText { // Return whether there's any text present return YES; } - (BOOL)canBecomeFirstResponder { return YES; } @end </code></pre> <p>when the view is attched, make it the first responder to show the keyboard</p> <pre><code>[myView becomeFirstResponder]; </code></pre> <p>or resign first responder to dismiss the keyboard</p> <pre><code>[myView resignFirstResponder]; </code></pre> <p>Edit: make sure your view is attached to the view hierarchy or this probably won't do anything.</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.
 

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