UISystemGateGestureRecognizer and delayed taps near bottom of screen

后端 未结 2 1911
攒了一身酷
攒了一身酷 2020-12-15 20:25

What are the standard UISystemGestureGateGestureRecognizers installed on the top level UIView of an iOS app for?

My app consists of two vie

2条回答
  •  不知归路
    2020-12-15 21:01

    This delayed touches bothered me too. Just as an addition to what's said before, here's a simple fix:

    override func viewDidAppear(_ animated: Bool) {
        let window = view.window!
        let gr0 = window.gestureRecognizers![0] as UIGestureRecognizer
        let gr1 = window.gestureRecognizers![1] as UIGestureRecognizer
        gr0.delaysTouchesBegan = false
        gr1.delaysTouchesBegan = false
    }
    

    no need to remove those gesture recognizers. just add this to the main view controller.

提交回复
热议问题