Last active
December 20, 2015 15:19
-
-
Save pulkitsinghal/6152975 to your computer and use it in GitHub Desktop.
Blink (fade-in and fade-out) text on iPhone or iOS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
myUILabel.alpha = 1.0; // start solid | |
[UIView animateWithDuration:1.5 | |
delay:0.0 | |
options:(UIViewAnimationOptionRepeat | | |
UIViewAnimationOptionAutoreverse) | |
animations:^{ | |
[UIView setAnimationRepeatCount:3]; // must be set before the other lines in this block | |
//fade-away / fade-out effect | |
myUILabel.alpha = 0.0; // move towards invisible | |
} | |
completion:^(BOOL finished){ | |
} | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment