ios - How to animate UIView while hiding or unhiding -
i want animate uiview while hiding or unhiding it.
i have button loads uiview "view.hidden=false"and hide "view.hidden=true".
is there way of hiding/unhiding while animating it?
use : default put alpha of view 0.0.
yourviewobject.alpha = 0.0f;
when trying unhide view use this:
yourviewobject.hidden = no; [uiview animatewithduration:0.5f animations:^{ yourviewobject.alpha = 1.0; } completion:^(bool finished) { //done }];
and @ hiding use this
[uiview animatewithduration:0.5f animations:^{ yourviewobject.alpha = 0.0; } completion:^(bool finished) { //done yourviewobject.hidden = yes; }];
Comments
Post a Comment