开发者

Best Practices: Fast UITableView Scrolling?

I know there has been a lot of discussion around fast scrolling. Apple provides excellent examples:

http://developer.apple.com/library/ios/#samplecode/TableViewSuite/Introduction/Intro.html

I will have a custom UITableViewCell that has 2 UIImageView's and 3 UILabels as subviews. If I just add them as subviews to the content view will my scrolling be slow?

Would it be be开发者_StackOverflowst to just draw these?


The answer I got from the UIKit guys at WWDC this year was "it kinda depends on what you're doing". If everything in the cell is opaque and simple, adding subviews directly to the content view is very performant. If you need some views to have varying opacity or changes, rendering it manually can be faster.

The videos for WWDC were just posted, I recommend you watch session 105 (second half specifically), it addresses analyzing and improving performance in UITableView, in a real world app.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜