title: Swipe between tabs
body: <p>How can I get a side by side transition using a tabBarController. Just like a "normal" ScrollView paging. </p>
  
  <p>Something like this: <a href="https://i.stack.imgur.com/R1lv1.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R1lv1.gif" alt="enter image description here"></a></p>
  
  <p>At the moment I'm using CrossDissolve:</p>
  
  <pre><code>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?) -&gt; NSTimeInterval {
      return 0.25
    }
  }
  </code></pre>
  
  <p>As an extension of the side by side transition I would like to add a swipe gesture on the tab self.view. But that's a later problem, now I need to find out how to make the transition.</p>