如何使用下一个按钮从一个文本字段转到下一个文本字段?
这是我无法运行的代码:
- (BOOL)textFieldShouldReturn:(UITextField *)theTextField {
if (theTextField == self.amountField) {
[theTextField resignFirstResponder];
} else if (theTextField == self.businessField) {
[self.memoField becomeFirstResponder];
}
return YES;
}
最佳答案
在你的第一个条件之前调用[textField resignFirstResponder];
关于ios - UITextField - 下一个按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26050306/