iPad: popup view out of another view

For one of my projects on the iPad I wanted to popup a detail window out of an existing image view, using some animation while popping up. CoreAnimation was the way to go, but I was facing difficulties to:

a) find out how to do it and
b) get it working.

The animation should combine movement (from the location of the clicked image to the location where the popup is shown), scaling (from the image size to the popup size) and rotation (for a nice effect). Google searches delivered bits and pieces, the best sample I found was MFFlip from Mike Lee. This didn’t include scaling and movement like I wanted it, so I added this and then packed it up nicely into a single class ViewFlipper with a single factory method that takes 2 views as parameters and does all the calculations and animation. The ViewFlipper class can be included without further dependencies into any project, except that you need to include the QuartzCore framework.

I’ve created a little sample iPad program around it that you can download here. I’ve put some documentation in the code that describes the what goes on inside. I hope this is useful for others who are struggling with this too.

Note: initially I kept having trouble with all of the examples I found, it turned out this was caused by the fact that I had one view with 3 subviews: a UITableView covering the entire view, the imageView and popupView (which were shown above the UITableView). I managed to solve this by moving the imageView and popupView onto a view of its own. I gave this extra view a transparent background, so that the underlying UITableView was still visible. This extra view also has the advantage that you can catch touch events on it which you can use to popdown the popup.

Ritmeester 1.2.3 available for download

Today version 1.2.3 of RitMeester has been released. This is a bugfix release that solves a synchronization problem with the iPhone client, when characters like &, < or > were used.

In the initial international version (MasterDrive) this problem was already solved.

MasterDrive (Ritmeester) now also available in English

Today a localized, English version of MasterDrive has been released. Masterdrive was originally developed for the Netherlands only (dubbed Ritmeester), targeting owners of lease-car who need to keep a registration of their car usage for the tax authorities. Over time functionality was added to also maintain a registration for professionals who want to keep track of car usage for commercial purposes, e.g. to invoice customers. The logical next step was to make the application available to a much wider audience by localizing it into English, a step that is now completed with the release of Masterdrive.

With Masterdrive it is very easy to maintain a administration of the drives made with your car(s) on your Mac. It supports drive templates with all the relevant information for much used drives, to make data entry as quick as possible.

Per April 21 the iPhone companion application version 1.1.2 is available for all countries through the AppStore.

Version 1.1.1 of Ritmeester Mobiel available

Version 1.1.1 of the mobile client for Ritmeester is available as a free download from the AppStore. This version adds the possibility to add a drive in two steps, entering the departure information when you start, and the arrival information when you finish a drive.