         tapGesture.delegate = self
         return view
     }()
-    
+
+    /// Returns `true` if `beginAppearanceTransition()` has been called with `true` as the first parameter, and `false`
+    /// if the first parameter is `false`. Returns `nil` if appearance transition is not in progress.
+    private var _isAppearing: Bool?
+
     public var screenEdgePanGestureEnabled = true
     
     public private(set) lazy var screenEdgePanGesture: UIScreenEdgePanGestureRecognizer = {

        
        switch sender.state {
        case .Changed:
            _panStartLocation = sender.locationInView(view)
            _panDelta         = delta
        case .Ended, .Cancelled:

        
        switch drawerDirection {
        case .Left:
            drawerState     = _panDelta <= 0 ? .Closed : .Opened
            constant        = min(_drawerConstraint.constant + delta, drawerWidth)
            backGroundAlpha = min(
                containerViewMaxAlpha,
                containerViewMaxAlpha*(abs(constant)/drawerWidth)
            )
        case .Right:
            drawerState     = _panDelta >= 0 ? .Closed : .Opened
            constant        = max(_drawerConstraint.constant + delta, -drawerWidth)
            backGroundAlpha = min(
                containerViewMaxAlpha,
