I have a textfield
which has a UIDatePicker
instead of a keyboard. I also made a toolbar
not connected with the datePicker
but that just appears when the textfield
is tapped. The problem is the animations. The datePicker
slides up nicely, but the toolbar
just appears before the animation of the datePicker
is done. This makes the whole thing look horrible. How would I set the animation to match the datePickers
? I have no experience with animations and none of the other posts did any good for me.
EDIT
Based on Tareks answer I was able to set the animation to slide up by doing the following.
First, Setting the toolbar to bottom of screen
pickerBar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 480, 320, 44)];
Seconds, Changing the location of the toolbar in the animation
[UIView animateWithDuration:.4 animations:^(void) {
CGRect rect = CGRectMake(0, 224-46, 320, 44);
[pickerBar setFrame:rect];