4

Solution note, Not a question.

UIScrollView suspends OpenGL rendering by preventing firing CADisplayLink tick when CADisplayLink registered with NSDefaultRunLoopMode.

But, if you use NSRunLoopCommonModes to solve this, UIScrollView will halt scrolling at burst scrolling. And after once halted, it does not scroll again. (broken)

And registering CADisplayLink in other thread/runloop (as described in answer of this question: CADisplayLink stops updating when UIScrollView scrolled) reduces UIScrollView behavior breaking, but cannot eliminate.

Community
  • 1
  • 1
eonil
  • 83,476
  • 81
  • 317
  • 516

1 Answers1

0

Use UITrackingRunLoopMode. It's specifically designed for scrolling stuffs.

Otherwise, call render & present code at -scrollViewDidScroll too, not only in CADisplayLink's tick callback.

eonil
  • 83,476
  • 81
  • 317
  • 516
  • 3
    This will partially work. scrollViewDidScroll: is only called when the scrolling actually moves. If you start a scroll, then hold still without lifting a finger, the render will not be called. – Matt Wilding Mar 22 '11 at 23:08
  • 1
    I'm experiencing the same problem as Matt. Any solution to this issue? – Ricardo Sanchez-Saez May 14 '11 at 15:47