Wipe Transitions

I wrote a class today called WipeView that can provide a wipe transition to make any image disappear. Like everything else I post, it’s open-source (Apache 2 license), and I’ve added it to moriarty.

Here’s a bottom-to-top example to see what this class can do:

That’s the moon Europa (of Jupiter) vanishing there.

This kind of transition was made famous by Star Wars and it has its own wiki page, so you know it’s a good one.

It’s a little tricky to implement directly using UIView animations, so WipeView accomplishes this by simultaneously animating a CALayer’s contentsRect and bounds. This is much simpler than trying to animate a mask, and faster to render since there’s no transparency.