I\'m trying to set the animation for the view to move up when keyboard is hiding and appearing for the text fields and I got it to work perfectly fine, but when the focus moves
-(BOOL)textFieldShouldBeginEditing:(UITextField*)textField { if (textField.tag == 1) { //first textField tag //textField 1 } else { //textField 2 } }