diff --git a/AlertController/AlertController/AlertController.swift b/AlertController/AlertController/AlertController.swift index 871252a..79ee22c 100644 --- a/AlertController/AlertController/AlertController.swift +++ b/AlertController/AlertController/AlertController.swift @@ -165,15 +165,6 @@ open class AlertController: UIViewController { super.viewWillAppear(animated) } - override open func viewDidAppear(_ animated: Bool) { - super.viewDidAppear(animated) - - if !isAlert && cancelButtonTag != 0 { - let tapGesture = UITapGestureRecognizer(target: self, action: #selector(AlertController.handleContainerViewTapGesture(_:))) - containerView.addGestureRecognizer(tapGesture) - } - } - open override func viewWillLayoutSubviews() { super.viewWillLayoutSubviews() layoutView(self.presentingViewController) @@ -615,16 +606,6 @@ open class AlertController: UIViewController { } } - // Handle ContainerView tap gesture - @objc func handleContainerViewTapGesture(_ sender: Any) { - // cancel action - let action = actions[cancelButtonTag - 1] - dismiss(animated: true) { - self.dimissAction?() - action.handler?(action) - } - } - // Handle DimmingView tap gesture @objc func handleBackgroundTapGesture(_ sender: Any) { if isEnableTapDimmingViewToDimissed {