How can I get a side-by-side transition using the tabBarController. Just like the "regular" ScrollView paging.
Something like that: 
I am currently using CrossDissolve:
class TransitioningObject: NSObject, UIViewControllerAnimatedTransitioning {
func animateTransition(transitionContext: UIViewControllerContextTransitioning) {
let fromView: UIView = transitionContext.viewForKey(UITransitionContextFromViewKey)!
let toView: UIView = transitionContext.viewForKey(UITransitionContextToViewKey)!
transitionContext.containerView()!.addSubview(fromView)
transitionContext.containerView()!.addSubview(toView)
UIView.transitionFromView(fromView, toView: toView, duration: transitionDuration(transitionContext), options: UIViewAnimationOptions.TransitionCrossDissolve) { finished in
transitionContext.completeTransition(true)
}
}
func transitionDuration(transitionContext: UIViewControllerContextTransitioning?) -> NSTimeInterval {
return 0.25
}
}
As an extension of the side transition, I would like to add a swipe gesture on the self.view tab. But this is a later problem, now I need to figure out how to make the transition.
source
share