开发者

iPhone: Force UIButton to redraw itself

开发者 https://www.devze.com 2023-01-04 18:14 出处:网络
I g开发者_如何学Cot 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 secon

I g开发者_如何学Cot 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.


You can use performSelector:withObject:afterDelay: to delay the image changes.

0

精彩评论

暂无评论...
验证码 换一张
取 消