UIScrollView在滚动时重绘内容? [英] UIScrollView redrawing content while scrolling?
本文介绍了UIScrollView在滚动时重绘内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我知道有一个属性或方法可以在滚动时使scrollview / uiview调用drawRect:方法。由于性能原因,默认情况下禁用此功能,但我需要启用它。
我不记得该方法的名称,因此我找不到它,任何知道我要寻找的人吗?
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?
预先感谢
推荐答案
我建议使用scrollViewDidScroll:-method,然后重绘视图。
I'ld suggest to use the scrollViewDidScroll:-method and then redraw the view.
- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
[someView setNeedsDisplay];
}
这篇关于UIScrollView在滚动时重绘内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文