我有一个 UITextFiled
,我向其应用委托(delegate)以通过按“完成”关闭键盘。
...
textfield.returnKeyType = UIReturnKeyDone;
textfield.delegate = self;
....
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[textField resignFirstResponder];
return YES;
}
我如何在按下“完成”时调用方法?
最佳答案
这就是你想要的吗?
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[textField resignFirstResponder];
[add your method here];
return YES;
}
关于objective-c - UITextField 委托(delegate),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6178638/