How can I make a UIButton "flash" (with a glow, or changing its image for a split second)
Posted
by marty
on Stack Overflow
See other posts from Stack Overflow
or by marty
Published on 2010-05-13T00:04:20Z
Indexed on
2010/05/13
6:34 UTC
Read the original article
Hit count: 202
I tried just making the image switch to black and then use sleep(1) and have it go back to the original image, but the sleep doesn't work at the right time, and I can't even see the black flash it goes so fast.
[blueButton setImage:[UIImage imageNamed:@"black.png"] forState:UIControlStateNormal]; sleep(3); [blueButton setImage:[UIImage imageNamed:@"blue.png"] forState:UIControlStateNormal];
I just want to make it give a indicator to this button. Any thoughts? Thanks.
© Stack Overflow or respective owner