WWDC笔记:2011 Session 125 UITableView Changes, Tips and Tricks
What’s New
Automatic Dimensions
- (CGFloat)tableView:(UITableView *)tableView
heightForHeaderInSection:(NSInteger)section
CGFloat UITableViewAutomaticDimension
Automatic Animation Style
UITableViewRowAnimationAutomatic
New Update Methods
- (void)moveSection:(NSInteger)section
toSection:(NSInteger)newSection
- (void)insertSections:(NSIndexSet *)sections
withRowAnimation:(UITableViewRowAnimation)animation
- (void)deleteSections:(NSIndexSet *)sections
withRowAnimation:(UITableViewRowAnimation)animation
- (void)reloadSections:(NSIndexSet *)sections
withRowAnimation:(UITableViewRowAnimation)animation
Demo
[self.tableView beginUpdates]; //更新cell位置section位置等等 [self.tableView endUpdates];
Menu Suppor
- (BOOL)tableView:(UITableView *)tableView
shouldShowMenuForRowAtIndexPath:(NSIndexPath *)indexPath
- (BOOL)tableView:(UITableView *)tableView
canPerformAction:(SEL)action
forRowAtIndexPath:(NSIndexPath *)indexPath
withSender:(id)sender
- (void)tableView:(UITableView *)tableView
performAction:(SEL)action
forRowAtIndexPath:(NSIndexPath *)indexPath
withSender:(id)sender
Multiple Selection
Table View Properties
BOOL allowsMultipleSelection
BOOL allowsMultipleSelectionDuringEditing
BOOL allowsSelection
BOOL allowsSelectionDuringEditing
Table View Method
- (NSArray *)indexPathsForSelectedRows
- (NSIndexPath *)indexPathForSelectedRow
Table View Cell Property
UIView *multipleSelectionBackgroundView
UIView *selectedBackgroundView
Automatic Cell Loading
- (void)registerNib:(UINib *)nib
forCellReuseIdentifier:(NSString *)identifier
Nib Constraints
- Nib must contain a single table view cell
- Cell’s reuse identifier must match the one specified above (or be nil)
Tips and Tricks
Action Row
Floating View
- (void)scrollViewDidScroll:(UIScrollView *)scrollView
Dynamic Background View
两倍background大小,animation option: UIViewAnimationOptionRepeat | UIViewAnimationOptionCurveLinear
Related Session
- Simplifying Touch Event Handling with Gesture Recognizers
- Advanced Gesture Recognition
WWDC笔记:2011 Session 125 UITableView Changes, Tips and Tricks的更多相关文章
- WWDC笔记:2013 Session 203 What’s New in Cocoa Touch(未完)
Multitasking Background fetching New background mode fetch - (void)application:(UIApplication *)appl ...
- WWDC笔记:2013 Session 201 Building User Interfaces for iOS 7
Text Dynamic Type Specifies fonts semantically Supports user text sizing Optimized for legibility Su ...
- webpy使用笔记(二) session/sessionid的使用
webpy使用笔记(二) session的使用 webpy使用系列之session的使用,虽然工作中使用的是django,但是自己并不喜欢那种大而全的东西~什么都给你准备好了,自己好像一个机器人一样赶 ...
- iOS回顾笔记(07) -- UITableView的使用和性能优化
iOS回顾笔记(07) -- UITableView的使用和性能优化 如果问iOS中最重要的最常用的UI控件是什么,我觉得UITableView当之无愧!似乎所有常规APP都使用到了UITableVi ...
- MZY项目笔记:session歧路
from my typora MZY项目笔记:session歧路 文章目录 MZY项目笔记:session歧路 那该怎么办? 1. 手动加上cookie的header. 2.自己模拟一个Session ...
- Nginx and PHP-FPM Configuration and Optimizing Tips and Tricks
原文链接:http://www.if-not-true-then-false.com/2011/nginx-and-php-fpm-configuration-and-optimizing-tips- ...
- (转) How to Train a GAN? Tips and tricks to make GANs work
How to Train a GAN? Tips and tricks to make GANs work 转自:https://github.com/soumith/ganhacks While r ...
- Matlab tips and tricks
matlab tips and tricks and ... page overview: I created this page as a vectorization helper but it g ...
- LoadRunner AJAX TruClient协议Tips and Tricks
LoadRunner AJAX TruClient协议Tips and Trickshttp://automationqa.com/forum.php?mod=viewthread&tid=2 ...
随机推荐
- 树莓派 - RasberryPi推送数据到cloudMQTT
创建用户 在https://www.cloudmqtt.com/上创建一个帐户 转到右上角的控制面板 点击"创建"按钮 安装lib sudo pip install paho-mq ...
- 如何用纯 CSS 创作炫酷的同心矩形旋转动画
效果预览 在线演示 按下右侧的"点击预览"按钮可以在当前页面预览,点击链接可以全屏预览. https://codepen.io/comehope/pen/bMvbRp 可交互视频教 ...
- 关于在views对models创建的表的简单操作
models.User.objects.create(c1='a',c2='b') obj=models.User(c1='a',c2='b') obj.save() 增加 models.User.o ...
- Python 3.52官方文档翻译 http://usyiyi.cn/translate/python_352/library/index.html 必看!
Python 3.52官方文档翻译 http://usyiyi.cn/translate/python_352/library/index.html 觉得好的麻烦点下推荐!谢谢!
- 可以从CSS框架中借鉴到什么
http://isux.tencent.com/css-framework.html http://isux.tencent.com/css-framework.html 现在很多人会使用 CSS 框 ...
- Ubuntu 16.04安装JDK7/JDK8的两种方式
ubuntu 安装jdk 的两种方式:1:通过ppa(源) 方式安装. 2:通过官网下载安装包安装. 这里推荐第1种,因为可以通过 apt-get upgrade 方式方便获得jdk的升级 使用ppa ...
- Leetcode 306.累加数
累加数 累加数是一个字符串,组成它的数字可以形成累加序列. 一个有效的累加序列必须至少包含 3 个数.除了最开始的两个数以外,字符串中的其他数都等于它之前两个数相加的和. 给定一个只包含数字 '0'- ...
- JavaEE JDBC 了解数据库连接池
了解数据库连接池 @author ixenos 数据库连接是有限的资源,如果用户需要离开应用一段时间,那么他占用的连接就不应该保持开放状态: 另一方面,每次查询都获取连接并在随后关闭它的代价也很高. ...
- google的三篇论文
文章:MapReduce/GFS/BigTable三大技术资料 文章:Google File System(中文翻译) 文章:MapReduce:超大机群上的简单数据处理 文章:Google's Bi ...
- HDU 3264 区间内的最大最小之差
题目链接:http://poj.org/problem?id=3264 题目大意:在给定一堆牛的数量以及其高度的时候,每次给定一段区间,求这个区间内最高的牛和最矮的牛的高度之差为多少. 可以直接利用R ...