UPDATE:
I also tried implementing UITextViewDelegate delegate and then doing in my controller:
- (BOOL)textViewShouldEndEditing:(UITextView *)textVie
Set the 'Return Key' option under the text field option in the inspector for your text field.
Then right click on the text field and while holding CTRL select 'Did End On Exit' and drag this into your view controllers file. This will create an IBAction method. Give the method a name and then enter the following values:
[textField becomeFirstResponder];
[textField resignFirstResponder];
Your method should look like this:
- (IBAction)methodName:(id)sender;
{
[sender becomeFirstResponder];
[sender resignFirstResponder];
}