-
Notifications
You must be signed in to change notification settings - Fork 472
Creating a Custom Modal Transition
Charlie Hieger edited this page Oct 19, 2015
·
25 revisions
Xcode allows us to choose from 3 different modal transitions, Cover Vertical, Flip Horizontal and Cross Dissolve. Unfortunately, there is no provided way to adjust these stock transitions; they are what they are. Fortunately, we can create all types of cool custom transitions to fit all your app building needs using a few custom transition classes that we will provide.
Download the Custom Transition Swift Files and drag them into your project. The Base Transition file contains the "behind the scenes" code to execute our transition. The Fade transition describes what happens during the transition.
Define a "global" variable for the custom transition above the viewDidLoad method. It will be of type, FadeTransition
.
var fadeTransition: FadeTransition!