Tag Archives: Xcode

Simple image (frame-by-frame) animation in IOS and Xcode

Adding frame-by-frame animations to your iOS application is simple once you find out that a UIImageView can be initialised with an array of images, not just one image.

This post was inspired by a colleague who had not uncovered that fact, and so had spent time arduously linking separate views with timers. This post shows how to use a single view and 3 lines of animation code to do all the work.

What to do?

What we’ll do as a test is animate the blinking eyes on a tennis-playing ninja splash screen. To trigger the animation will add a “blink” button on the same screen.

Don’t ask how we ended up with that as the example (thanks to the friend). But you can download the entire project, or just the images if wanting to join in.
Continue reading