To move the view when a textfield is selected (bringing the textfield to the vertical center of the view), I am using textFieldDidBeginEditing and then when the user finishes, textFieldDidEndEditing to move the view back where it started.

This accomplishes the goal.

However, when it comes time for the user to press a submit button, a defect of the above is that the view shifts back before the VC disappears creating a jarring transition.

I would like the button to stay in the same place or at least have some control over the view in relation to the button.

Is there a way to exempt pressing the button from textFieldDidEndEditing or alternatively, is there a method similar to textFieldDidBeginEditing that applies to buttons so you can keep them in the center of the view.

This is what I am using for the textField

```
-(void)textFieldDidBeginEditing:(UITextField *)sender
{
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:.3];
    [UIView setAnimationBeginsFromCurrentState:TRUE];
    if ([sender isEqual:_username]) {
    self.view.frame = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y -70., self.view.frame.size.width, self.view.frame.size.height);
           }
    else if([sender isEqual:_password]) {
         self.view.frame = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y -90., self.view.frame.size.width, self.view.frame.size.height);
    }
    else if([sender isEqual:_Email]) {
        self.view.frame = CGRectMake(self.view.frame.origin.x, self.view.frame.origin.y -110., self.view.frame.size.width, self.view.frame.size.height);
    }

```

Thanks for any suggestions.