CADisplayLink stops updating when UIScrollView scrolled

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

    You can also mitigate the effects of this issue by using NSRunLoopCommonModes instead of NSDefaultRunLoopModes:

    [displayLink addToRunLoop:[NSRunLoop currentRunLoop]
                      forMode:NSRunLoopCommonModes];
    

提交回复
热议问题