It is no longer difficult to animate the controller. Creating a transition animation requires only two steps.

_showAnimation = [SGTransitionAnimation transitionAnimationWithAnimationDurationl:animationTime TransitioningBlock:
^(UIViewController *fromViewController,
UIViewController *toViewController,
UIView *containerView,
SGAnimationCompleteTransitionBlock completeTransitionBlock) {
//Your animation code.
//When your animation is complete,
//be sure to call the completeTransitionBlock.
}];
Transition includes four types of transitions: Push, Pop, Present, and Dismiss. According to the specific rotation movement, select the corresponding transition type.
_transition = [SGControllerTransition
viewControllerPresentTransitonWithToViewController:
toViewController
transitionAnimation:
_showAnimation];
- Add pod 'SGControllerTransition','~> 1.0.0' to your Podfile.
- Run pod install or pod update.
- Import <SGControllerTransition/SGControllerTransition.h>.
SGControllerTransition is provided under the MIT license. See LICENSE file for details.