I've just been having the exact same issue, and this is the solution that I came to.
Set up a separate method for handling when your textField's keyboard is resigned, and place your self.view.center realignment in there. This way, you can ensure that your textFieldDidEndEditing method is kept separate.
Here's an example if I haven't explained myself properly. Note that when the user taps on a textField, I place a DONE button in the navigation bar (due to it being a numerical keypad), although you can link this method to the DONE button on a normal keyboard:
- (void)textFieldDidBeginEditing:(UITextField *)textField {
UIBarButtonItem *hideKeyboardButton = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStyleDone target:self action:@selector(resignResponder:)];
[self.navigationItem setRightBarButtonItem:hideKeyboardButton animated:YES];
}
- (void)textFieldDidEndEditing:(UITextField *)textField {
//Nothing needs to go here anymore
}
- (void)resignResponder:(id)sender {
[textField resignFirstResponder];
//Use core animation instead of the simple action below in order to reduce 'snapback'
self.view.center = CGRectMake(0, 0, 320, 480);
}