开发者

UIScrollView performance problem

I'm having performance issues related to touches being delivered with latency, thus making it unresponsive. The app contains lots of UIScrollViews, but only a couple are on the display list at once. Adding more scroll views makes latency worse, removing them makes it better.

Problems goes a开发者_JS百科way if I convert the scroll views to plain old UIView. Setting scrollEnabled=NO doesn't help, which is I guessed it should.

I traced with Instruments time profiler (image below) and UIScrollView is the culprit. Also it seems NSNotificationCenter is involved.

Again: the scroll views aren't even on the display tree! I might have hundreds of UIScrollViews in an array in memory, but those guys still affects performance.

Any ideas what to do about this?

UIScrollView performance problem


Set delaysContentTouches to NO on your scrollviews and see if the problem improves or disappears.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜