Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dismiss keyboard on UITextField using Interface Builder

I've seen this, but don't remember what Jedi technique exactly was used through interface builder to dismiss uikeboard when return key is pressed. Anyone knows how to do this?

Please do not post about using UITextFieldDelegate, I know that method, I'm only interested in forcing keyboard to be dismissed on return key being hit without any additional logic or protocol conformation.

like image 364
Eugene Avatar asked Mar 17 '13 17:03

Eugene


1 Answers

Connect the IBAction with "Did End On Exit" event in your xib of your textfield

-(IBAction)textFieldDidEndOnExit:(UITextField *)sender
{

}
like image 101
Muhammad Zeeshan Avatar answered Nov 06 '22 05:11

Muhammad Zeeshan