Working on an iOS app right now – was curious to if it is possible to use an animated sprite for a button in the Top Nav Bar. For example, having the hands on a clock button continually turn via a looped animation (like a web GIF – but better). Is this possible, and if so, how difficult is it?
Thanks!
Zach
Check out the
animatedImageNamed:duration:andanimatedImageWithImages:duration:methods ofUIImage. You will have to put each frame of each sprite in a separate file, or (if you don’t want to split up your animated GIF) use theImageIOframework to create separateUIImageobjects for each frame in the GIF.