     open var type: AnyClass! {
         return LABMenuViewController.self
     }
+    public enum ButtonPosition {
+        case left
+        case right
+    }
     open var menuView: LABMenuView!
     open var internalNavigationController: UINavigationController!
     open var barColor = UIColor.gray
     open var barTintColor = UIColor.white
     open var menuProportionalWidth: NSNumber?
     open var hideMenuButtonWhenShow: Bool = false
+    open var backPosition: ButtonPosition = .right
     private var handlerView: UIView!
+    
+    private var backButton: UIBarButtonItem!
+    private var menuButton: UIBarButtonItem!
     
     override open func viewDidLoad() {
         super.viewDidLoad()

    }
    
    public func setMenuButton(image: UIImage) {
        let menuButton: UIBarButtonItem = UIBarButtonItem.barButton(nil,
                                                                    image: image,
                                                                    titleColor: menuView.tint,
                                                                    font: UIFont.systemFont(ofSize: 12),
                                                                    inContext: self,
                                                                    selector: #selector(LABMenuViewController.toggleLeft))
        setMenuButton(button: menuButton)
    }
    
    public func setMenuButton(button: UIBarButtonItem) {
        self.navigationItem.leftBarButtonItem = button
        self.navigationItem.leftBarButtonItem!.tintColor = menuView.tint
    }
    
    private func addBackButton() {
        if self.navigationItem.rightBarButtonItem != nil {
            return
        }
        
        let backButton = UIBarButtonItem.barButton(nil,
                                                   image: nil,
                                                   titleColor: menuView.tint,
                                                   font: UIFont.systemFont(ofSize: 12),
                                                   inContext: self,
                                                   selector: #selector(LABMenuViewController.onBackClick))
        self.navigationItem.rightBarButtonItem = backButton
        self.navigationItem.rightBarButtonItem!.tintColor = menuView.tint
    }
    
    private func removeBackButton() {

        internalNavigationController.popViewController(animated: true)
        
        if internalNavigationController.viewControllers.count == 1 {
            switch backPosition {
            case .left:
                menuButton.customView!.alpha = 1
                navigationItem.leftBarButtonItem = menuButton
                break
            case .right:
                removeBackButton()
                break
            }
            
        }
    }
    
