     
     private var currentOrientation: UIDeviceOrientation = .unknown
     
+    #if swift(>=3.2)
+    private var observeContext: NSKeyValueObservation?
+    #else
+    private var isObserveKVO: Bool = false
+    private static var observeContext: Int = 0
+    #endif
+
     /// Gesture
     private var gestureBeginPoint: CGPoint = CGPoint.zero
     private var gestureMovePoint: CGPoint = CGPoint.zero

        }
        
        /// Events
        view.addObserver(self, forKeyPath: "center", options: .new, context: nil)
    }
    
    deinit {
        view.removeObserver(self, forKeyPath:"center")
    }
    
    open override func viewDidLayoutSubviews() {

        updateLayout()
    }
    
    #if !swift(>=3.2)
    open override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey: Any]?, context: UnsafeMutableRawPointer?) {
        guard context == &DrawerController.observeContext else {
            observeValue(forKeyPath: keyPath, of: object, change: change, context: context)
            return
        }
        guard isObserveKVO else { return }

        if keyPath == "frame" {
            updateLayout()
        }
    }
    #endif

    public required init?(coder aDecoder: NSCoder) {
        super.init(coder: aDecoder)
    }
