0

I have a timed simulation running in a custom UIView (where I'm doing 2D painting in drawRect) that I've now embedded in a UIScrollView. To my disappointment, the timer-generated calls to setNeedsDisplay() of the custom view are not resulting in actual display refreshes during a long scroll (panning gesture over several seconds, in which case several simulation frames are lost). Instead the last contents of the custom view are frozen during the gesture then update immediately to the latest upon the end of the gesture.

Is there a way to force the contents of a UIScrollView to redraw during zooms, pinches, and pans? Various blind wall-dart attempts at "forcing something" during the UIScrollView's delegate methods have failed.

BaseZen
  • 8,650
  • 3
  • 35
  • 47
  • I assume you're using `NSTimer` because you said “the timer-generated calls”. If you're not using `NSTimer`, post a comment and I'll reopen. – rob mayoff Mar 09 '16 at 22:35
  • Thank you, I mistakenly assumed that the timer was running. – BaseZen Mar 09 '16 at 22:42

0 Answers0