objective c - How to fade in and fade out a label. continuously -


in xcode project have put label on xib.

i want fade label in , out continuously until user taps screen. when happens want new view appear.

can suggest how fade-in/out?

you put pair of chained animation in loop or call function holds chained animation everytime until encounter user tap.

by chained animation, mean (you can set animation duration suit needs):

mylabel.alpha = 0.0; [uiview animatewithduration:1.0                       delay:0.0                     options: uiviewanimationcurveeaseout                  animations:^{                      mylabel.alpha = 1.0;                  }                   completion:^(bool finished){                       [uiview animatewithduration:1.0                                             delay:1.0                                            options: uiviewanimationcurveeaseout                               animations:^{                                      mylabel.alpha = 0.0;                                }                    completion:^(bool finished){                      nslog(@"done!");                          }];                  }]; 

the above code first fade in label , fade out. can put in function , call until encounter user tap.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -