ios - How to animate a UILabel after another -


i animate 2 uilabel such:

[uiview beginanimations:nil context:null]; [uiview setanimationduration:2.0]; [_temperaturelabel setalpha:1]; [_tempdescriptionlabel setalpha:1]; [uiview commitanimations]; 

however, want show first label _temperaturelabel once done animating (or maybe halfway through) start animating second label _tempdescriptionlabel.

as said i'll answer:

 [uiview animatewithduration:2 delay:0 options:uiviewanimationoptioncurveeasein animations:^{           //set alpha 1 first uilabel          _temperaturelabel.alpha = 1;          } completion:^(bool finished){          [uiview animatewithduration:2 delay:0 options:uiviewanimationoptioncurveeasein animations:^{                  //when finished enter here             //set alpha 1 second uilabel             _tempdescriptionlabel.alpha = 1;              } completion:^(bool finished){               }];          }]; 

remember add quartzcore framework, , add #import <quartzcore/quartzcore.h>


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -