     fileprivate func setup() {
         self.panGestureRecognizer = UIPanGestureRecognizer(target: self, action: #selector(handlePanGesture(gr:)))
         self.tapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleTapGesture(gr:)))
+        self.tapGestureRecognizer?.delegate = self
         self.view.addGestureRecognizer(self.panGestureRecognizer!)
         self.panGestureRecognizer?.maximumNumberOfTouches = 1
         self.view.addGestureRecognizer(self.tapGestureRecognizer!)

    public func showSideController() {
        self._state = .side
    }
}

//MARK: Gesture management
extension SimpleSideController {
    @objc fileprivate func handlePanGesture(gr: UIPanGestureRecognizer) {
        switch gr.state {
        case .began:

        self.view.bringSubview(toFront: self.sideContainerView)
        self.sideContainerView.hideShadow(animation: 0.0)
        
        switch self.background {
        case .translucent:
            self.sideContainerView.backgroundColor = .clear
            let blurEffect = UIBlurEffect(style: .light)
            self.blurView = UIVisualEffectView(effect: blurEffect)
            self.sideContainerView.insertSubview(self.blurView!, at: 0)
            self.pinIntoSideContainer(view: self.blurView!)
            self.addChildViewController(self.sideController)
            self.blurView?.contentView.addSubview(self.sideController.view)
            self.pinIntoSuperView(view: self.sideController.view)
            self.sideController.didMove(toParentViewController: self)
        case .opaque(_, _):
            self.addChildViewController(self.sideController)
            self.sideContainerView.addSubview(self.sideController.view)
            self.pinIntoSideContainer(view: self.sideController.view)
            self.sideController.didMove(toParentViewController: self)
        }
    }
}

extension SimpleSideController: UIGestureRecognizerDelegate {
    public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
        return gestureRecognizer == self.tapGestureRecognizer &&
        !self.sideContainerView.frame.contains(touch.location(in: self.view))
    }
}

