标签:
1 .实现UITextFieldDelegate协议
.m文件里面实现
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{
if(![self.textfild isExclusiveTouch]){
[self.textfild resignFirstResponder];
}
}
- (BOOL)textFieldShouldReturn:(UITextField *)textField{
[self.textfild resignFirstResponder];
return YES;
}
标签:
原文地址:http://blog.csdn.net/u012663571/article/details/42499373