@interface..... {
UITextField *textField;
}
@property (nonatomic, retain) IBOutlet UITextField *textField;
-(IBAction)textFieldDoneEditing:(id)sender;
//* this is for if you would like the keyboard to disappear from touching the background :
-(IBAction)backgroundTap:(id)sender;
in interface builder connect that to the text field of your choice, and use DID END ON EXIT if you chjoose to use the backGroundTap method, in the main window, click on the gray box named VIEW click on the inspector, and click the 4th tab, or press COMMAND 4 then at the topo change the class from UIView to UIControl then go to the connections and drag the TOUCH DOWN to the Files Owner and select BackgroundTap