Transition
Easy interactive interruptible custom ViewController transitions
...You have to implement the correct delegates, handle the switching between passive animation and active interaction phases, ensure the timing is right, think of interruption and cancellation, keep responsibilities separated... It quickly gets messy! This is where Transition helps you out: you just define the animation and the interaction, Transition ties it all together. Your AnimationLayer is defined as a part of your TransitionAnimation. This represents all (non-interactive) animation during a transition. The TransitionAnimation protocol exposes an array of AnimationLayers. Additionally, it contains two functions; one for setup and one for completion. Before starting the animation, your setup function will be called, passing you the transitioningContext that among others contains the fromView and toView.