     let tapGesture = UITapGestureRecognizer(target: self, action: #selector(tapGesture(gesture:)))
     tapGesture.numberOfTapsRequired = 1
     tapGesture.numberOfTouchesRequired = 1
+    tapGesture.delegate = self
     sideMenuContainerView.addGestureRecognizer(tapGesture)
   }
   

    if let shouldOpen = delegate?.sideMenuShouldOpenSideMenu?() , !shouldOpen {
      return false
    }
    
    if let gestureRecognizer = gestureRecognizer as? UISwipeGestureRecognizer {
      if !allowLeftSwipe && gestureRecognizer.direction == .left {
        return false
      }
      
      if !allowRightSwipe && gestureRecognizer.direction == .right {
        return false
      }


import UIKit

public final class LNSideMenu: NSObject {
  
  public typealias Completion = () -> ()
  
