I create my own number pad view successfully and I want to simulate the default number pad appear animated effect, but it can't work fine, it can't animate as default number pad, how do I modify?
I have a UITextField call "fNumber" and a custom number pad view call myNumberPadView and created by interface builder, when the "fNumber" is focued I will show the myNumberPadView animated, so I code as follow:
- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField {
if (textField == fNumber){
CGRect frame = CGRectMake(0, 270, 320, 230);
myNumberPadView.frame = frame;
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.75];
frame.origin.x = 0;
frame.origin.y = 270;
[UIView commitAnimations];
[self.view addSubview:myNumberPadView];
}
return NO;
}
The "myNumberPadView" is show as a subview, it doesn't the "animate" effect as the default number pad, how can to make it to "animate" appear?