UPDATE:
I also tried implementing UITextViewDelegate delegate and then doing in my controller:
- (BOOL)textViewShouldEndEditing:(UITextView *)textVie
Go into your storyboard, select your text field and under the Attributes Inspector there is an option that says "return key"...select "Done".
Then go into your ViewController and add:
- (IBAction)dismissKeyboard:(id)sender;
{
[textField becomeFirstResponder];
[textField resignFirstResponder];
}
Then go back to your text field, click outlets and link "Did end on exit" to dismissKeyboard action.