Big question
First of all, the answer to pressing the "GO" or "SEARCH" button is your responsibility. This means that when the user clicks "GO" - in your application you need to catch this event and implement everything that you want there (maybe you are looking for something). This means that you can execute this implementation and just click on it before rejecting the keyboard.
EDIT:
First of all, how to respond to keystrokes in your application:
match the text field delegate:
@interface MyViewController : UIViewController <UITextFieldDelegate>
and then override this method with your implementation - what do you want to do when the user clicks on the return key? (or go or search, etc.):
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
This is how you react to clicks on the return key and implement everything you want when you click.
note that you can change the features of the GO and SEARCH buttons with
theTextField.returnKeyType = UIReturnKeySearch;
Please note that YOUR implementation is what matters in the whole deal here - and you can simply implement this implementation right before rejecting the keyboard.
Thank you and good luck!
source share