So I have looked around a quite a bit, and nothing on here seems to explain exactly the correct way of doing this. I have 7 UITextFields within a custom UITableViewCell.
To declare your TableViewController as the delegate include
at the end of your @interface
in the TableViewController's .h file.
@interface MyTableViewController : UITableViewController
Then, connect the text fields by ctrl-dragging each field under the @interface
. Each UITextField is connected to its respective property by an IBOutlet. Finally, in the .m file include the following function to show the delegate which field you want to return....
- (BOOL)textFieldShouldReturn:(UITextField *)textField {
[aTextField resignFirstResponder];
return YES;
}