     }
     
     private func dismissedFrameInContainerView(containerView: UIView, direction: Direction) -> CGRect {
-        var frame = presentedFrameInContainerView(containerView, direction: direction)
+        var frame = presentedFrameInContainerView(containerView)
         switch direction {
         case .Left:
             frame.origin.x += containerView.frame.size.width

        if toViewController != nil {
            containerView.addSubview(toViewController!.view)
        }
        toViewController?.view.frame = dismissedFrameInContainerView(containerView, direction: direction)
        UIView.animateWithDuration(
            duration,

    
    // MARK: - Private functions
    
    private func presentedFrameInContainerView(containerView: UIView) -> CGRect {
        // TODO: Use AutoLayout
        var frame = containerView.bounds
        frame.origin.x += leftInset
