How to recognize tap gesture while a view is animating

后端 未结 3 1034
慢半拍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:46

    You need to set two options - UIViewAnimationOptionAllowUserInteraction and UIViewAnimationOptionAllowAnimatedContent. First lets you interact with views during animation, second forces to redraw views on every frame of animation and not use snapshots of beginning and ending frames.

提交回复
热议问题