Simple animations with UIImageView

07. January 2017 blog 0

Our website has gotten a bit make-over the last few years. We started to focus more on the visual aspects of the site. One part of that is the use of illustrations. We wanted to give our new apps the same care and attention but sometimes it is not so easy to use branding or visuals on a relatively small screen. Nevertheless, we did some small things that make a big difference and might even make our users smile a bit. An example of this is the animation we added to indicate that you have reached the bottom of our result list.

For this animation we used a simple UIImageView with 4 separate image frames of a cyclist. The frames in this imageview are animated and the imageview itself is also animated from left to right. This results in a pretty decent animation that was made within an hour or so. Not a bad investment for a little fun!

Here’s the relevant code to animate the frames:

Download the complete Xcode playground here: AnimatedImageView.playground (42KB .zip file)