最佳实践:快速UITableView滚动? [英] Best Practices: Fast UITableView Scrolling?

查看:109
本文介绍了最佳实践:快速UITableView滚动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有很多关于快速滚动的讨论。 Apple提供了很好的示例:



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



我将有一个自定义UITableViewCell有2个UIImageView和3 UILabels作为子视图。如果我只是将它们作为子视图添加到内容视图,我的滚动会变慢吗?



最好只是绘制这些?


<我从WWDC的UIKit家伙今年得到的答案是它有点取决于你在做什么。如果单元格中的所有内容都是不透明和简单的,则将内容视图直接添加到内容视图中是非常有效的。如果您需要一些视图来改变不透明度或更改,则手动渲染可以更快。



WWDC的视频刚刚发布,我建议你观看会话105(下半年),它解决分析和提高性能在UITableView,在现实世界的应用程序。


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 best 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.

这篇关于最佳实践:快速UITableView滚动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆