Skip to content

Instantly share code, notes, and snippets.

@pulkitsinghal
Last active December 20, 2015 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pulkitsinghal/6152975 to your computer and use it in GitHub Desktop.
Save pulkitsinghal/6152975 to your computer and use it in GitHub Desktop.
Blink (fade-in and fade-out) text on iPhone or iOS
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