             action: "handlePanGesture:"
         )
         switch self.drawerDirection {
-        case .Left:
-            gesture.edges = .Left
-        case .Right:
-            gesture.edges = .Right
+        case .Left:     gesture.edges = .Left
+        case .Right:    gesture.edges = .Right
         }
         gesture.delegate = self
         return gesture

        return gesture
    }()
    
    public weak var delegate         : KYDrawerControllerDelegate?
    
    public var drawerDirection      : DrawerDirection = .Left
    
    public var drawerState          : DrawerState! {
        get {
            return _containerView.hidden ? .Closed : .Opened
        }
        set {
            setDrawerState(drawerState, animated: false)
        }
    }
    
    @IBInspectable public var drawerWidth: CGFloat = 280
    
    public var mainViewController: UIViewController! {
        didSet {

                oldController.view.removeFromSuperview()
                oldController.removeFromParentViewController()
            }
            guard let mainViewController = mainViewController else { return }
            let viewDictionary      = ["mainView" : mainViewController.view]
            mainViewController.view.translatesAutoresizingMaskIntoConstraints = false
            addChildViewController(mainViewController)
            view.insertSubview(mainViewController.view, atIndex: 0)
            view.addConstraints(
                NSLayoutConstraint.constraintsWithVisualFormat(
                    "V:|-0-[mainView]-0-|",
                    options: [],
                    metrics: nil,
                    views: viewDictionary
                )
            )
            view.addConstraints(
                NSLayoutConstraint.constraintsWithVisualFormat(
                    "H:|-0-[mainView]-0-|",
                    options: [],
                    metrics: nil,
                    views: viewDictionary
                )
            )
            mainViewController.didMoveToParentViewController(self)
        }
    }
    
