Apple Watch - Animated Image Sequences Forwards & Backwards

A powerful animating functionality on the Apple Watch, allowing you to flip through sequence of images like a GIF as easy as numbering your images in your Watch assets like this:

To animate it all you have to do is assign the image to a group or WKImage

playPauseImage.setImageNamed(“PlayPauseMorph”)

and animate it! The NSRange depends on the number of images you include in the asset.

playPauseImage.startAnimatingWithImagesInRange(NSMakeRange(0, 30), duration: 0.5, repeatCount: 1)

Turns out, setting the duration to a negative value actually animates the image sequence backwards!

animating backwards:

playPauseImage.startAnimatingWithImagesInRange(NSMakeRange(0, 30), duration: -0.5, repeatCount: 1)

As a result:

Designed by Yvon Huang

Feel free to contact me!

GitHub | Twitter | Facebook | JackyWangDeveloper@gmail.com

Thanks for reading, Happy Coding!