         case .right:
             targetOffset = rightContainerOffset
         }
-        
         return (currentXOffset.constant, currentYOffset.constant) == (targetOffset.dx, targetOffset.dy)
-    }
-    
-    func onDone(sender: AnyObject) {
-        showEmbeddedView(position: .center)
-    }
-    
-    func onshowEmbeddedView(position: Position, sender: AnyObject) {
-        showEmbeddedView(position: position)
-        
-        
-        
     }
     
     // MARK: - Pan Gestures

    case vertical
}

public protocol EmbeddedViewControllerDelegate: class {
    // delegate to provide information about other containers
    func isContainerActive(position: Position) -> Bool
    
    // delegate to handle containers events
    func onDone(sender: AnyObject)
    func onshowEmbeddedView(position: Position, sender: AnyObject)
}

open class SwipeNavigationController: UIViewController {
    
    // Mark: - Properties

        currentYOffset.constant = targetOffset.dy
        disappearingViewController?.beginAppearanceTransition(false, animated: true)
        activeViewController.beginAppearanceTransition(true, animated: true)
        delegate?.swipeNavigationController(self, willShowEmbeddedViewForPosition: position)
        UIView.animate(withDuration: swipeAnimateDuration, animations: {
            self.view.layoutIfNeeded()
        }) { (finished) in
            self.delegate?.swipeNavigationController(self, didShowEmbeddedViewForPosition: position)
            self.activeViewController.endAppearanceTransition()
            disappearingViewController?.endAppearanceTransition()
        }
    }
    
    open func isContainerActive(position: Position) -> Bool {
        let targetOffset: CGVector
        switch position {
