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 ...
随机推荐
- 配置github SSH公钥登录
git的安装见https://www.cnblogs.com/liliyang/p/9829931.html 配置git使用ssh密钥 git支持https和git两种传输协议,github分享链接时 ...
- VMware Workstation 14 UEFI启动
1.新建虚拟机 完成后不要启动 修改虚拟机目录下的XXX.vmx文件 添加一行:firmware="efi" 然后启动UEFI安装系统.
- Android Studio修改默认字体大小
安装Android Studio后,默认的字体很小,看着很不舒服,如下图 因此,我们需要改变字体大小,步骤如下: 一.打开设置 二.找到Font,这里系统的主题不能修改,我们点击Save As... ...
- Git 二进制文件冲突解决
Git 二进制文件冲突解决 在我们合并分支的时候,如果两个分支都进行了修改那么就会产生合并冲突.对于非二进制文件的冲突解决,git会给出冲突的位置我们可以手动修改然后再commit.但是对于非二进制文 ...
- [Go]接口的运用
在Go语言中,不能通过调用new函数或make函数创建初一个接口类型的值,也无法用字面量来表示一个接口类型的值.可以通过关键字type和interface声明接口类型,接口类型的类型字面量与结构体类型 ...
- php实现设计模式————单例模式
php实现设计模式————单例模式 什么是单例模式 为什么要使用单例模式 php中有哪些方式实现新建一个对象实例 如何阻止这种实例化实现理想的单例模式 代码实现 什么是单例模式 为什么要使用单例模式 ...
- HDU 4821 字符串hash
题目大意: 希望找到连续的长为m*l的子串,使得m个l长的子串每一个都不一样,问能找到多少个这样的子串 简单的字符串hash,提前预处理出每一个长度为l的字符串的hash值 #include < ...
- X230 安装 EI Capitan 10.11.5 驱动篇
/* 键盘又换回了 美蓓亚键盘 缩写nmb 虽然比群光软 但是手感真的出色,貌似x宝没有这个代工厂的键盘(全新,非拆机,而且是标准us阵列,背光版) 有人肯定会问,博主这么纠结键盘干嘛? ...
- Enchantress(hdu 3922)
首先考虑覆盖三个点的情况,有两种情况: ①:三个点都在圆上,则该圆是三角形的外接圆 ②:两个点在圆上,第三个点在圆内,且在圆上的两个点之间的线段一定是直径 如果是多个圆,就不停地迭代. 有一点重要的是 ...
- js编程习惯
1. JS代码中,相同的代码使用成员变量定义. 2. JS中对空值的判断,如if(str == null || str == undefined || str == ‘’){ XXX } 可以直接 ...