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
Tweaking Krishnabhadra Answer to give a better blink effect
Declare a Class variable bool blinkStatus;
And paste code given below
NSTimer *yourtimer = [NSTimer scheduledTimerWithTimeInterval:(NSTimeInterval)(10.0 / 60.0) target:self selector:@selector(blink) userInfo:nil repeats:TRUE];
blinkStatus = FALSE;
-(void)blink{
if(blinkStatus == FALSE){
yourLabel.hidden=NO;
blinkStatus = TRUE;
}else {
yourLabel.hidden=YES;
blinkStatus = FALSE;
}
}