最終更新:2017-07-26 (水) 05:14:36 (2478d)
UITextFieldDelegate
Top / UITextFieldDelegate
Tasks
Managing Editing
- UITextFieldDelegate textFieldShouldBeginEditing:?(UITextField *)textField
- UITextFieldDelegate textFieldDidBeginEditing:?(UITextField *)textField
- UITextFieldDelegate textFieldShouldEndEditing:?(UITextField *)textField
- UITextFieldDelegate textFieldDidEndEditing:?(UITextField *)textField
Editing the Text Field’s Text
- UITextFieldDelegate textField:shouldChangeCharactersInRange:replacementString?
- UITextFieldDelegate textFieldShouldClear:?(UITextField *)textField
- UITextFieldDelegate textFieldShouldReturn:(UITextField *)textField - Asks the delegate if the text field should process the pressing of the return button.
Swift
例
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField - (void)textFieldDidBeginEditing:(UITextField *)textField - (BOOL)textFieldShouldEndEditing:(UITextField *)textField - (void)textFieldDidEndEditing:(UITextField *)textField - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string - (BOOL)textFieldShouldClear:(UITextField *)textField - (BOOL)textFieldShouldReturn:(UITextField *)textField