When you click the keyboard in the iOS TextField input box, move up with the keyboard
-(Void) textFieldDidBeginEditing :( UITextField *) textField
{
CGRect frame = textField. frame;
Int offset = frame. origin. y + 70-(self. view. frame. size. height-216.0); // iPhone keyboard height 216, iPad 352
[UIView beginAnimations: @ "ResizeForKeyboard" context: nil];
[UIView setAnimationDuration: 0.5f];
// Move the Y coordinate of the view to the offset Unit so that the following space is used for the display of the soft keyboard.
If (offset> 0)
Self. view. frame = CGRectMake (0.0f,-offset, self. view. frame. size. width, self. view. frame. size. height );
[UIView commitAnimations];
}
// After the input box is edited, the view is restored to the original state.
-(Void) textFieldDidEndEditing :( UITextField *) textField
{
Self. view. frame = CGRectMake (0, 0, self. view. frame. size. width, self. view. frame. size. height );
}