 
     setNeedsLayout()
     performEntranceAnimation {
-      self.containerView?.addGestureRecognizer(self.tapRemoveGestureRecognizer ?? UITapGestureRecognizer())
-      self.containerView?.addGestureRecognizer(self.swipeGestureRecognizer ?? UITapGestureRecognizer())
+      if self.shouldDismissOnTap {
+          self.containerView?.addGestureRecognizer(self.tapRemoveGestureRecognizer ?? UITapGestureRecognizer())
+      }
+      if self.shouldDismissOnSwipeOutside {
+        self.containerView?.addGestureRecognizer(self.swipeGestureRecognizer ?? UITapGestureRecognizer())
+      }
       self.appearHandler?(self)
       if self.startActionAnimationOnShow {
         self.performActionAnimation()

      self.addGestureRecognizer(tapGestureRecognizer ?? UITapGestureRecognizer())
    }
    if tapRemoveGestureRecognizer == nil {
      tapRemoveGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(PopTip.handleTapRemove(_:)))
    }
    if swipeGestureRecognizer == nil {
      swipeGestureRecognizer = UISwipeGestureRecognizer(target: self, action: #selector(PopTip.handleSwipe(_:)))
    }

    if isApplicationInBackground == nil {

      hide()
    }
    tapHandler?(self)
  }

  @objc fileprivate func handleApplicationActive() {
