In many situations, such as making the keyboard go away when the use clicks done, there are two options: set the text field's delegate to self, and adopt the UITextFieldDelegate protocol, and then use the method - (BOOL)textFieldShouldReturn:(UITextField *)textField; to resignFirstResponder and return YES. But you can also addTarget:self action:@selector(myMethod:) forControlEvent:UIControlEventDidEndOnExit]; or something like that, using the did end on exit event, and then in the method, [sender resignFirstResponder]. So what is the best option in situations like these: the delegate, or the event?
Thanks!!