Skip to content

Instantly share code, notes, and snippets.

@keicoder
Created February 13, 2014 09:47
Show Gist options
  • Select an option

  • Save keicoder/8972423 to your computer and use it in GitHub Desktop.

Select an option

Save keicoder/8972423 to your computer and use it in GitHub Desktop.
objective-c : three steps to create a custom transition in iOS
//three steps to create a custom transition in iOS:
//1. Create the animation controller. The first step is to create a class that implements the UIViewControllerAnimatedTransitioning protocol. This class contains the code to perform the actual animation, so this class is referred to as the animation controller.
//2. Before presenting a view controller, set its transitioning delegate. Before you present a view controller, you should set a class as its transitioning delegate (usually the presenting view controller). By doing this the delegate will get a callback asking for the animation controller to use when presenting the view controller.
//3. Return the animation controller in the callback. Finally, implement the callback method to return an instance of the animation controller you created in step 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment