1. 代理
UITextFieldDelegate
2. 设置代理
textfield.delegate = self;
3. 代理事件处理
#pragma mark - textfiled代理
-(void)textFieldDidEndEditing:(UITextField *)textField{
[[[UIApplication sharedApplication] keyWindow] endEditing:YES];
}
1. 代理
UITextFieldDelegate
2. 设置代理
textfield.delegate = self;
3. 代理事件处理
#pragma mark - textfiled代理
-(void)textFieldDidEndEditing:(UITextField *)textField{
[[[UIApplication sharedApplication] keyWindow] endEditing:YES];
}
转载于:https://www.cnblogs.com/SimonGao/p/5106692.html