In my current IOS project I want to display an image on screen, but make it a little more interesting.
The FlipBoard iPad application has a nice start screen which pans the images it displays, quite an eye catching effect. I wanted to do something similar in my application.
To achieve this I created a UIView subclass with the following structure:
I then used [UIView animateWithDuration] to move the UIImageView whichever way I want.
In the sample code the view selects a random animation from the following set:
- Pan Left
- Pan Right
- Zoom In
- Zoom Out
The end result is quite nice!
Sample code can be downloaded here: https://code.google.com/p/objective-c-panview
Screenshot from the sample is below. Clicking “Animate” will select a random animation.