How to recognize tap gesture while a view is animating

后端 未结 3 1032
慢半拍i
慢半拍i 2021-02-08 20:09

Just wondering is there way to have a view recognize tap gestures while it is being animated? I am working on a view that has a cashapelayer line tethered to it. When the user p

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-08 20:41

    (Swift 3) Pass .allowUserInteraction option

    UIView.animate(withDuration: 0.75, delay: 0.0, options: [.allowUserInteraction], animations: {
          // Desired animation(s) 
    }, completion: { (finished: Bool) in
            // Completion
    })
    

提交回复
热议问题