Reputation: 349
I have two text fields. I am using this code in textFieldDidBeginEditing
, but it's not dismissing the keyboard.
-(void)textFieldDidBeginEditing:(UITextField *)textField {
if(textField==textFieldOne)
{
}
else if (textField==textFieldTwo)
{
[[IQKeyboardManager sharedManager]resignFirstResponder]
}
}
Upvotes: 4
Views: 2893
Reputation: 1003
This might help Try
-(void)textFieldDidBeginEditing:(UITextField *)textField {
if(textField==textFieldOne)
{
}
else if (textField==textFieldTwo)
{
[self.view endEditing:YES];
}
}
Upvotes: 2