         
     }
     
-    func handleTapGesture(recognizer: UITapGestureRecognizer){
+    func handleTapGesture(recognizer: UITapGestureRecognizer) {
         if leftViewController != nil {
             animateLeftPanel(false)
-            self.centerVCFrontBlurView.removeFromSuperview()
-        }
-    }
+            centerVCFrontBlurView?.removeFromSuperview()
+        }
+    }
+    
     // close left panel
     override func touchesEnded(touches: Set<UITouch>, withEvent event: UIEvent?) {
         if leftViewController != nil{
             animateLeftPanel(false)
-            self.centerVCFrontBlurView.removeFromSuperview()
+            centerVCFrontBlurView?.removeFromSuperview()
         }
     }
     

        addChildViewController(centerNavigationController)
        centerNavigationController.didMoveToParentViewController(self)
        
        self.configureGestureRecognizer()
    }
    
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()
        self.centerVCFrontBlurView.frame = self.view.frame
    }

    
    func configureBlurView(){
        //        centerVCFrontBlurView = UIButton.buttonWithType(UIButtonType.Custom) as! UIButton
        let viewEffect = UIBlurEffect(style: .Light)
        centerVCFrontBlurView = UIVisualEffectView(effect: viewEffect)
        centerVCFrontBlurView.alpha = 0.9
        centerVCFrontBlurView.frame = self.view.frame
        
    }
    
    func configureGestureRecognizer(){
        let panGestureRecognizer = UIScreenEdgePanGestureRecognizer(target: self, action: "handlePanGesture:")
        panGestureRecognizer.edges = UIRectEdge.Left
        centerNavigationController.view.addGestureRecognizer(panGestureRecognizer)
        //        panGestureRecognizer.delegate = self
        
        let tapGestureRecognizer = UITapGestureRecognizer(target: self, action: "handleTapGesture:")
        centerVCFrontBlurView.addGestureRecognizer(tapGestureRecognizer)
    }
    

    }
    
    func animateLeftPanel(shouldExpand: Bool) {
        if shouldExpand {
            currentState = .LeftPanelExpanded
            animateCenterPanelXPosition(kExpandedOffSet)
        } else {
