gitmyhub

VCTransitionsLibrary

Objective-C ★ 4.5k updated 6y ago

A collection of iOS7 animation controllers and interaction controllers, providing flip, fold and all kinds of other transitions.

A collection of pre-built animated screen transition effects for iOS apps, flip, fold, cube, cards, and more, that you drop into your project to replace the default slide or fade animations.

Objective-CiOSCocoaPodssetup: easycomplexity 2/5

VCTransitionsLibrary is a collection of animated screen transition effects for iOS apps, built for iOS 7 and written in Objective-C. When you move from one screen to another in a mobile app, iOS normally fades or slides between them. This library gives you a set of pre-built alternatives: flip, fold, crossfade, explode, turn, cards, cube, pan, and a few others inspired by specific visual styles. You drop the code into your project and apply whichever animation you want.

The library separates two concerns cleanly. Animation controllers handle how the visual change looks: the cards flying out, the page turning, the cube rotating. Interaction controllers handle user gestures: a swipe or pinch that lets the user drag the transition partway through and then either complete it or cancel it and go back. Because the two types of controllers are independent, you can pair any animation with any gesture interaction without the library imposing a fixed combination.

The transitions work in three common iOS navigation contexts: presenting and dismissing screens modally, pushing and popping screens inside a navigation stack, and switching tabs in a tab bar app. The README covers how to wire each of these up with a few lines of code. Animation controllers also support playing in reverse, which is useful for pop or tab-back transitions.

You can add the library to your project through CocoaPods, a dependency manager for iOS, or by manually copying the relevant files. The repository includes a demo app in a folder called TransitionsDemo that shows all the effects running. The README notes this project was written to accompany a chapter in a book about iOS 7 development.

Where it fits