1. 网络图片异步加载,SDWebImage。
  2. 文字直接 drawInRect/drawAtPoint 绘制,参考 ABTableViewCell,AdvancedTableViewCells
  3. 本地图片也可以直接绘制,或者用 CALayer 来添加显示。
  4. cell 重用机制。
  5. cell 内容尽量避免透明效果。
  6. 如非必要,减少 reloadData 全部 cell,只 reloadRowsAtIndexPaths。
  7. 如果 cell 是动态行高,计算出高度后缓存。tableView 会在加载的时候把全部 cell 的高度通过heightForRowAtIndexPath: 都计算出来,即使 cell 还没有展示。
  8. 如果 cell content 的展示位置也不固定,第一次计算后也要缓存。
  9. cell 高度固定的话直接用 cell.rowHeight 设置高度,不要再实现tableView:heightForRowAtIndexPath: delegate.
  10. cell content 的解析操作(尤其是复杂的解析)异步进行+预执行,解析结果要缓存。
  11. 可以预先加载需要的网络资源(图片等),SDWebImagePrefetcher.

There are performance implications to using tableView:heightForRowAtIndexPath: instead of therowHeight property. Every time a table view is displayed, it calls tableView: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://fann.im/blog/2012/09/11/uitableview-optimization-notes/

UITableView 性能优化的更多相关文章

  1. 【原/转】UITableview性能优化总结

    UITableView作为ios中使用最频繁的控件之一,其性能优化也是常常要面对的,尤其是当数据量偏大并且设备性能不足时.本文旨在总结tableview的几个性能优化tips,并且随着认识的深入,本文 ...

  2. UITableView性能优化

    关于UITableView的性能优化,网络上也有一些总结.在这里就介绍下我们项目中遇到的问题以及对应的解决方法.相信我们遇到的问题也有一定的普适性,能够作为其他问题的优化方案. Instruments ...

  3. UITableView性能优化及手工绘制UITableViewCell

    提高表视图的性能 UITableView作为应用中最常用的视图,它的性能优化问题几乎是经常提及.下面对在非网络访问情况下的表视图性能优化进行了主要的几点说明: 1.自定义类或XIB文件时 在系统提供的 ...

  4. UITableView性能优化【本文摘自智车芯官网】

    UITableView是个表格视图,可以在表格行空间中添加多个子控件,UITableView继承了UIScrollView,默认状态下可以堆单元格进行滚动,所有的UITableViewControll ...

  5. uitableview性能优化(转)

    这个感觉写的很好 收藏一下 以备后用 转自 http://www.cnblogs.com/pengyingh/articles/2354714.html 在iOS应用中,UITableView应该是使 ...

  6. iOS边练边学--UITableView性能优化之三种方式循环利用

    一.cell的循环利用方式1: /** * 什么时候调用:每当有一个cell进入视野范围内就会调用 */ - (UITableViewCell *)tableView:(UITableView *)t ...

  7. 【解决方法】UITableView 性能优化笔记

    1.网络图片异步载入,SDWebImage. 2.文字直接 drawInRect/drawAtPoint 绘制,參考 ABTableViewCell.AdvancedTableViewCells. 3 ...

  8. iOS回顾笔记(07) -- UITableView的使用和性能优化

    iOS回顾笔记(07) -- UITableView的使用和性能优化 如果问iOS中最重要的最常用的UI控件是什么,我觉得UITableView当之无愧!似乎所有常规APP都使用到了UITableVi ...

  9. iOS_UITableView性能优化那些事

    UITableView在实际开发中使用频率实在是很高, 因此, UITableView的性能优化是必不可少的, 本文下面就略微总结一下UITableView性能优化那些事. 本文着重介绍具体方法, 原 ...

随机推荐

  1. Java 微信登录授权后获取微信用户信息昵称乱码问题解决

    String getUserInfoUrl = "https://api.weixin.qq.com/sns/userinfo?access_token="+access_toke ...

  2. Redhat_AS5下安装MySQL5.0总结

    一.引言 使用Linux也有几年时间了,由于公司要做radius服务器用用到MySQL.从网上找了些资料. 二.安装Mysql 1.下载MySQL的安装文件 安装MySQL需要下面两个文件: MySQ ...

  3. Chapter 1 First Sight——36

    The door opened again, and the cold wind suddenly gusted through the room, rustling the papers on th ...

  4. STM32F446 OTG_FS_DP/DM调试

    之前项目用STM32F207,现在升级到用STM32F446处理器,用到USB的OTG_FS模式接法: 1.USB只连接了DP/DM 2.DP需上拉1.5K的电阻到3.3V 3.PA9(VBUS) 和 ...

  5. js 输出HTML 样式

    document.write("<div style='width: 100px;height: 100px;background-color: greenyellow;'>Th ...

  6. selenium高级用法

    http://docs.seleniumhq.org/docs/04_webdriver_advanced.jsp# WebDriver: Advanced Usage Explicit and Im ...

  7. 解析好的静态页面.shtml浏览器无法解析.需要apache解析后再返回给浏览器

    解析好的静态页面.shtml浏览器无法解析.需要apache解析后再返回给浏览器 让Apache支持SHTML(SSI)的配置方法 http.conf放开addtype text/html .shtm ...

  8. assert()函数用法

    assert是定义在头文件cassert中的宏 其作用是如果他的返回值不为真则终止程序. assert(expression); if 为假,先向stderr打印一条错误信息,再用abort终止程序 ...

  9. 配置php时。提示的错误session_start(): Failed to initialize storage module解决办法

    当浏览器输入访问地址后 报这样的错时----session_start(): Failed to initialize storage module 进入到此目录vi /usr/local/php/e ...

  10. linq中first() firstordefault() last() lastOrDefault() single() singleOrDeafult

    一.firstordefault() 和 first() class Program { static void Main(string[] args) { List<Emp> list ...