Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blinking effect on UILabel

I have a UILabel with background color as grey.

I want a blinking effect on this label like it should become a little white & then become gray and it should keep happen till I turn it off programatically.

Any clue how to achieve this?

like image 614
Abhinav Avatar asked Jun 03 '11 07:06

Abhinav


1 Answers

You can do this within a block:

self.yourLabel.alpha = 1; [UIView animateWithDuration:1.5 delay:0.5 options:UIViewAnimationOptionRepeat | UIViewAnimationOptionAutoreverse animations:^{         self.yourLabel.alpha = 0; } completion:nil]; 

So you dont need a second method.

like image 144
Flex Elektro Deimling Avatar answered Oct 19 '22 22:10

Flex Elektro Deimling