Posted By

BenClayton on 02/10/11


Tagged


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

concertman
Tintenklecks
cnathan


iPhone: Close keyboard when done button pressed


 / Published in: Objective C
 

make your class implement the on your UITextField object, do myTextField.delegate = self.

  1. #pragma mark -
  2. #pragma mark UITextFieldDelegate methods
  3. - (BOOL)textFieldShouldReturn:(UITextField *)theTextField {
  4. [theTextField resignFirstResponder];
  5. return YES;
  6. }

Report this snippet  

You need to login to post a comment.