CADisplayLink stops updating when UIScrollView scrolled

后端 未结 8 1303
星月不相逢
星月不相逢 2020-12-05 15:17

Title is quite self explanatory, but I have some animation being done in a loop triggered by CADisplayLink. However, as soon as I scroll a UIScrollView I have added to my vi

相关标签:
8条回答
  • 2020-12-05 15:47

    I found that if I set the frame interval to 2 instead of 1 (so 30 frames a second) everything works fine. So what I'm doing is setting it to 2 when my popover comes up and resetting it to 1 when it dismisses.

    0 讨论(0)
  • Run the display link (using -addToRunLoop:forMode:) on another thread with another run loop. So create a new thread, create a run loop on that thread, and run the CADisplayLink on that thread/run loop.

    0 讨论(0)
提交回复
热议问题