resignFirstResponder OR - (IBAction) doneButtonOnKeyboardPressed: (id)sender
- by mihirpmehta
I was just wondering which approach is better to hide keyboard in iphone application
1 Implement
- (IBAction) doneButtonOnKeyboardPressed: (id)sender
{
}
Method on Textfield 's Did End On Exit Event
OR
In Textfield implement this
-(BOOL)textFieldShouldReturn:(UITextField *)theTextField {
[txtName resignFirstResponder];
return YES;
}
Which Option is better to choose in which situation...? Any one Option has advantage over other...?