CADisplayLink stops updating when UIScrollView scrolled

后端 未结 8 1419
星月不相逢
星月不相逢 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:33

    Here you can find a better (and more complex) solution:

    Animation in OpenGL ES view freezes when UIScrollView is dragged on iPhone

    that allows you to use 'NSRunLoopCommonModes' and avoids OpenGL freezing when holding a finger without scrolling.

    This is related to what Doug found (setting the frame interval of CADisplayLink to 2 instead of 1 fixing UIScrollView).

提交回复
热议问题