Class
WKInerfaceTextField
An interface element that displays an editable text area.
UI界面控件连接
@IBOutlet weak var myTextField: WKInterfaceTextField!
During your interface controller’s initialization, WatchKit creates a new instance of the WKInterfaceTextField class and assigns it to your outlet. At that point, you can use the object in your outlet to manage the text field.
Receive Text Input
获取输入的文本内容
- (IBAction)textFieldAction:(NSString*) value
Receive Text Input
To receive the text entered by the user, connect the text field in the storyboard to an action method defined in your interface controller.
WKInerfaceTextField
An interface element that displays an editable text area.
UI界面控件连接
@IBOutlet weak var myTextField: WKInterfaceTextField!
During your interface controller’s initialization, WatchKit creates a new instance of the WKInterfaceTextField class and assigns it to your outlet. At that point, you can use the object in your outlet to manage the text field.
Receive Text Input
获取输入的文本内容
- (IBAction)textFieldAction:(NSString*) value
Receive Text Input
To receive the text entered by the user, connect the text field in the storyboard to an action method defined in your interface controller.