     public func setDrawerState(state: DrawerState, animated: Bool) {
         _containerView.hidden = false
         let duration: NSTimeInterval = animated ? drawerAnimationDuration : 0
-        
+
+        let isAppearing = state == .Opened
+        if _isAppearing != isAppearing {
+            _isAppearing = isAppearing
+            drawerViewController?.beginAppearanceTransition(isAppearing, animated: animated)
+            mainViewController?.beginAppearanceTransition(!isAppearing, animated: animated)
+        }
+
         UIView.animateWithDuration(duration,
             delay: 0,
             options: .CurveEaseOut,

        tapGesture.delegate = self
        return view
    }()
    
    public var screenEdgePanGestureEnabled = true
    
    public private(set) lazy var screenEdgePanGesture: UIScreenEdgePanGestureRecognizer = {

                if state == .Closed {
                    self._containerView.hidden = true
                }
                self.drawerViewController?.endAppearanceTransition()
                self.mainViewController?.endAppearanceTransition()
                self._isAppearing = nil
                self.delegate?.drawerController?(self, stateChanged: state)
        }
    }
