resignFirstResponder OR - (IBAction) doneButtonOnKeyboardPressed: (id)sender
Posted
by mihirpmehta
on Stack Overflow
See other posts from Stack Overflow
or by mihirpmehta
Published on 2010-04-01T08:04:22Z
Indexed on
2010/04/03
23:13 UTC
Read the original article
Hit count: 395
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...?
© Stack Overflow or respective owner