UIKeyInput Protocol Reference
| Conforms to | |
| Framework | /System/Library/Frameworks/UIKit.framework |
| Availability | Available in iOS 3.2 and later. |
| Declared in | UITextInput.h |
Overview
A subclass of UIResponder can adopt this protocol to implement simple text entry. When instances of this subclass are the first responder, the system keyboard is displayed.
Only a small subset of the available keyboards and languages are available to classes that adopt this protocol.
Tasks
Inserting and Deleting Text
-
– insertText:required method -
– deleteBackwardrequired method -
– hasTextrequired method
Instance Methods
deleteBackward
Delete a character from the displayed text. (required)
Discussion
Remove the character just before the cursor from your class’s backing store and redisplay the text.
Availability
- Available in iOS 3.2 and later.
Declared In
UITextInput.hhasText
A Boolean value that indicates whether the text-entry objects has any text. (required)
Return Value
YES if the backing store has textual content, NO otherwise.
Availability
- Available in iOS 3.2 and later.
Declared In
UITextInput.hinsertText:
Insert a character into the displayed text. (required)
Parameters
- text
A string object representing the character typed on the system keyboard.
Discussion
Add the character text to your class’s backing store at the index corresponding to the cursor and redisplay the text.
Availability
- Available in iOS 3.2 and later.
Declared In
UITextInput.h© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-02-25)