CCTextField Class Reference
| Inherits from | CCControl : CCNode : CCResponder : NSObject |
| Conforms to | UITextFieldDelegate |
| Declared in | CCTextField.h |
Overview
The CCTextField is used for editing text by encapsulating a native text field (NSTextField on Mac and UITextField on iOS). An action callback will be sent when the text finishes editing or if the return key is pressed.
Warning: The native text field is only translated, no other transformations are applied. The text field may not be displayed correctly if rotated or scaled.
Tasks
-
+ textFieldWithSpriteFrame: -
– initWithSpriteFrame: -
textFieldproperty -
backgroundSpriteFrameproperty -
fontSizeproperty -
paddingproperty -
stringproperty
Properties
backgroundSpriteFrame
The sprite frame used to render the text field’s background.
@property (nonatomic, strong) CCSpriteFrame *backgroundSpriteFrameDeclared In
CCTextField.hfontSize
The font size of the text field, defined in the unit specified by the heightUnit component of the contentSizeType.
@property (nonatomic, assign) float fontSizeDeclared In
CCTextField.hpadding
Padding from the edge of the text field’s background to the native text field component.
@property (nonatomic, assign) float paddingDeclared In
CCTextField.h