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

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -