简体   繁体   中英

UIScrollView redrawing content while scrolling?

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

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

- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
    [someView setNeedsDisplay];
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM