【发布时间】:2010-03-30 17:42:47
【问题描述】:
-(BOOL) textFieldShouldReturn:(UITextField*) theTextField{
[theTextField resignFirstResponder];
return YES;
}
它不工作....
【问题讨论】:
标签: iphone uitextfield
-(BOOL) textFieldShouldReturn:(UITextField*) theTextField{
[theTextField resignFirstResponder];
return YES;
}
它不工作....
【问题讨论】:
标签: iphone uitextfield
This answer 表明代理决定是否关闭键盘。
如果要关闭键盘,textFieldShouldReturn: 必须返回 NO:
-(BOOL) textFieldShouldReturn:(UITextField*) theTextField{
[theTextField resignFirstResponder];
return NO;
}
【讨论】: