我根据苹果的文档进行程序设计。但是在解除键盘的时候出了问题:
- (BOOL) textFieldShouldReturn: (UITextField *) theTextField
{
if(theTextField == self.textField)
{
[theTextField resignFirstResponder];
}
return YES;
}
请指教。谢谢
可使用下面的代码关闭键盘
[[[UIApplication sharedApplication] keyWindow] endEditing:YES];