I want to add an animation to my
transition.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut)
myUIView.layer.addAnimation(transition, forKey: nil)
The easiest way is to use
transitionCoordinator and call
animateAlongsideTransition:completion: which is documented in UIViewControllerTransitionCoordinator.
viewWillAppear is usually a good place to do this.
You can then run any animations you want along with the default animation.