ios - Setting an animation for a toolbar from the beginning -
i have textfield
has uidatepicker
instead of keyboard. made toolbar
not connected datepicker
appears when textfield
tapped. problem animations. datepicker
slides nicely, toolbar
appears before animation of datepicker
done. makes whole thing horrible. how set animation match datepickers
? have no experience animations , none of other posts did me.
edit
based on tareks answer able set animation slide doing following.
first, setting toolbar bottom of screen
pickerbar = [[uitoolbar alloc] initwithframe:cgrectmake(0, 480, 320, 44)];
seconds, changing location of toolbar in animation
[uiview animatewithduration:.4 animations:^(void) { cgrect rect = cgrectmake(0, 224-46, 320, 44); [pickerbar setframe:rect];
you can use code below show toolbar:
[uiview animatewithduration:2.0 animations:^(void) { toolbar.alpha = 1; }];
edit:
toolbar.alpha
should 0.
for sliding: gonna like:
[uiview animatewithduration:2 animations:^{ int newy = yval; // can play newy. cgrect frame = toolbar.frame; frame.origin.y = newy; toolbar.frame = frame; }];
Comments
Post a Comment