TransitioningKit is a Swift framework providing a set of components for simplifying, clarifying, & standardizing the implemention of custom Navigation & View Controller transitions.
TransitioningKit currently provides three commonly needed public classes, and one public protocol:
A concrete implementation of the UINavigationControllerDelegate protocol.
When assigned to the
delegate property of a UINavigationController, PSNavigationControllerDelegate assumes the responsibility of vending UIViewControllerAnimatedTransitioning (“animator”) and UIPercentDrivenInteractiveTransition (“interaction controller”) objects for
A concrete implementation of the UIViewControllerTransitioningDelegate protocol.
Similar to PSNavigationControllerDelegate, when assigned to the
transitioningDelegate property of a UIViewController, PSViewControllerTransitioningDelegate assumes the responsibility of vending UIViewControllerAnimatedTransitioning (“animator”), UIPercentDrivenInteractiveTransition (“interaction controller”), and UIPresentationController (“presentation controller”) objects for
A subclass of UIPercentDrivenInteractiveTransition.
PSPanGestureInteractionController coordinates a
UIPanGestureRecognizer to simplify implementation of common gesture driven interactive transitions. It includes simple a delegate protocol which you implement to customize behavior for your application.
A custom protocol for handling
PSPanGestureInteractionController events within your application.
Here we have a simplified example of transitioning between three view controllers.
In this instance, we are seeing a custom, interactive, “push” operation between these two view controllers. Here are the parts involed in this operation:
PSPanGestureInteractionControlleris instantiated with
PSNavigationControllerDelegateis instantiated with the interaction controller and the animator.
PSNavigationControllerDelegateis assigned as the navigation controller
In this instance, we are seeing a modal “present” & “dismiss” operation between these two view controllers.
PSViewControllerTransitioningDelegateis instantiated with the animators.
PSViewControllerTransitioningDelegateis assigned to as the modal view controller's
Add the following to your project's
github "puffinsupply/TransitioningKit" >= 0.0.1