Loading screen for TTImageView
I have a table with images that are loaded from the web. I'd like to have an animated loading screen while it's loading.
I tried (successfully) to use a UIImageView
and use the animation property. I want the loading animation to be synced however. What would be the cleanest way to do this?
I tried to use NSTimer
. I would use NSDate
to get miliseconds = m. Then (m * 500) % 4 to get 4 frames per 2 seconds. I wasn't able to get it to work. I also feel it's a bit messy to ha开发者_如何学Gove 10 to 20 timers going on at the same time. One thing I was thinking is to have a singleton that has a NSMutableArray
to which you can add a selector that updates the appropriate image. But it's still quite messy. Any ideas?
I suggest you check out MBProgressHUD:
More info:
http://macindie.com/2011/01/mbprogresshud-when-you-simply-have-to-make-users-wait/
精彩评论