 
 class SSASideMenu: UIViewController, UIGestureRecognizerDelegate {
     
-    enum SSASideMenuPanDirection: Int {
-        case Edge = 0
-        case EveryWhere = 1
+    enum SSASideMenuPanDirection {
+        case Edge
+        case EveryWhere
+        case Rect(CGRect)
+        case EdgeAndRect(CGRect)
     }
     
     enum SSASideMenuType: Int {

            
        }
        
        let completionClosure: () -> () =  {[unowned self] () -> () in
            
            visibleMenuViewController?.endAppearanceTransition()
            
            if isRightMenuVisible, let viewController = self.rightMenuViewController {
                self.delegate?.sideMenuDidHideMenuViewController?(self, menuViewController: viewController)
            }
            
            if !isRightMenuVisible, let viewController = self.leftMenuViewController {
                self.delegate?.sideMenuDidHideMenuViewController?(self, menuViewController: viewController)
            }
            
        }

                return true
            case .Edge:
                let point = touch.locationInView(gestureRecognizer.view)
                return point.x < 20.0 || point.x > view.frame.size.width - 20.0
            case .Rect(let rect):
                let point = touch.locationInView(gestureRecognizer.view)
                return point.x > rect.origin.x
                    && point.y > rect.origin.y
                    && point.x < rect.origin.x + rect.size.width
                    && point.y < rect.origin.y + rect.size.height
            case .EdgeAndRect(let rect):
                let point = touch.locationInView(gestureRecognizer.view)
                return point.x < 20.0 || point.x > view.frame.size.width - 20.0
                    || point.x > rect.origin.x
                    && point.y > rect.origin.y
                    && point.x < rect.origin.x + rect.size.width
                    && point.y < rect.origin.y + rect.size.height

            }
        }
        
