Using UITextField Delegate Function :
If clicked on any textfield then wants to view move on up, using this we can move view
If clicked on any textfield then wants to view move on up, using this we can move view
- (void)textFieldDidBeginEditing:(UITextField *)textField{[self animateTextField:textField up:YES];}- (void)textFieldDidEndEditing:(UITextField *)textField{[self animateTextField:textField up:NO];}-(void)animateTextField:(UITextField*)textField up:(BOOL)up{int movementDistance = -100; // tweak as neededfloat movementDuration = 0.3f; // tweak as neededint movement = (up ? movementDistance : -movementDistance);[UIView beginAnimations: @"animateTextField" context: nil];[UIView setAnimationBeginsFromCurrentState: YES];[UIView setAnimationDuration: movementDuration];self.view.frame = CGRectOffset(self.view.frame, 0, movement);[UIView commitAnimations];
}