    */
   private func addSwipeGestureToMasterViewController() {
     guard let master = self.mainViewController else { return }
-    guard let view = master.viewControllers.first?.view else { return }
+    guard let nav = master.viewControllers.first as? UINavigationController else { return }
+    guard let view = nav.viewControllers.first?.view else { return }
     
     let panGestureRecognizer = UIPanGestureRecognizer(target: self, action: #selector(MillefeuilleViewController.handlePanGesture(_:)))
     panGestureRecognizer.delegate = self
     view.addGestureRecognizer(panGestureRecognizer)
-
   }
 }
 

      return
    }
    
    
    // Simple gesture with no drag and drop
    switch(recognizer.state) {

      break
    }
  }
  
  public func gestureRecognizerShouldBegin(gestureRecognizer: UIGestureRecognizer) -> Bool {
    
    if gestureRecognizer is UITapGestureRecognizer {
