2

I know there is a property or method that makes the scrollview/uiview call drawRect: method while is scrolling. By default is disabled because of performance reasons but I need to enable it. I cannot remember the name of the method hence I cannot look for it, anyone who knows what I am looking for?

Thanks in advance

nacho4d
  • 43,720
  • 45
  • 157
  • 240

1 Answers1

1

I'ld suggest to use the scrollViewDidScroll:-method and then redraw the view.

- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
    [someView setNeedsDisplay];
}
cutsoy
  • 10,127
  • 4
  • 40
  • 57
  • I am afraid I cannot use this approach because actually I rendering only currently visible lines of text, so using this delegate method will show nothing until the the scroller completely stopped. – nacho4d Aug 12 '10 at 07:35
  • uh, this method is called at every change (even when the user is still dragging). So when the user drags 100px, this method is called 100 times (excluding the momentum). – cutsoy Aug 12 '10 at 09:27