Swift-isUserInteractionEnabled = false,但启用2个手势

时间:2018-12-25 07:47:32

标签: swift uigesturerecognizer user-interaction setuserinteractionenabled

除了要取消的双击外,我想阻止与用户的交互。 是否可以将 isUserInteractionEnabled = false 例外规则放在我的双击行下面?

style="@style/Widget.MaterialComponents.BottomAppBar"

-

override func viewDidLoad() {
    super.viewDidLoad()

    let tapGR = UITapGestureRecognizer(target: self, action: #selector(PostlistViewController.handleTap(_:)))
    tapGR.delegate = self
    tapGR.numberOfTapsRequired = 2
    view.addGestureRecognizer(tapGR)
}

谢谢!

0 个答案:

没有答案