Im dynamically creating textFields
on UIScrollView
, I'm animating View to bring textField above the keyboard if keyboard is hiding it. To animate View is used code given below:
- (void)textFieldDidBeginEditing:(UITextField *)textField
{
CGRect textFiledFrame = textField.frame;
if (textFiledFrame.origin.y > 219 && textField.tag > 150 && viewAnimated == 0) {
CGRect superViewFrame = textField.superview.frame;
superViewFrame.origin.y = superViewFrame.origin.y - 120;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.6];
[textField.superview setFrame:superViewFrame];
[UIView commitAnimations];
viewAnimated = 1;
}
}
for every single time i'm clicking on textFields textFieldDidBeginEditing:(UITextField *)textField
is being call but once view get animated, textFieldDidBeginEditing:(UITextField *)textField
is not being called