Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

almostPro

macrumors newbie
Original poster
Jun 27, 2010
2
0
Hi, I have a little problem and I would be gratefull if someone could help me. I got 5 UIButtons placed next to each other and what I wanna do is set image on first button, redraw it so it, wait for 1 second, then set some other image on second button, redraw second button and so on.
I tried to set image on button, then call function sleep(1) and so on but it just freezes application for 5 seconds and then redraws all 5 buttons at the same time.

Thanks in advance for any suggestion.
 
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7)

I would probably look into using an NSTimer.
 
Thanks all for replays, performSelector:withObject:afterDelay: works perfect...
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.