I want to dismiss my keyboard as I press RETURN key.
I have tried by putting button in view\'s back side.
But how can I do this by pressing RETURN key?
Make sure your view controller class is a delegate for your UITextField
and then use the delegate method in that class:
#pragma mark - Delegate Methods
- (BOOL)textFieldShouldReturn:(UITextField *)textField{
// Dismiss the keyboard when the Return key is pressed.
[textField resignFirstResponder];
return YES;
}