UIScrollView redrawing content while scrolling?

一笑奈何 提交于 2019-12-24 02:06:22

问题


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


回答1:


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

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


来源:https://stackoverflow.com/questions/3465536/uiscrollview-redrawing-content-while-scrolling

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!