先要遵循协议 设置代理
self.jiagetextfield.delegate=self;
self.mingchengtextfield.delegate=self;
//释放第一响应者
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
[self.mingchengtextfield resignFirstResponder];
[self.jiagetextfield resignFirstResponder];
}
//bool 释放第一响应者
-(BOOL)textFieldShouldReturn:(UITextField *)textField{
[textField resignFirstResponder];
return YES;
}