标签:
源地址:http://fann.im/blog/2012/09/11/uitableview-optimization-notes/
Hacking Week 技术总结最后一篇,记一下 UITableView 性能优化需要注意和改进的地方。
heightForRowAtIndexPath:
都计算出来,即使 cell 还没有展示。cell.rowHeight
设置高度,不要再实现 tableView:heightForRowAtIndexPath:
delegate.There are performance implications to using
tableView:heightForRowAtIndexPath:
instead of therowHeight
property. Every time a table view is displayed, it callstableView:heightForRowAtIndexPath:
on the delegate for each of its rows, which can result in a significant performance problem with table views having a large number of rows (approximately 1000 or more). via Apple Document
标签:
原文地址:http://www.cnblogs.com/michaellfx/p/4189476.html