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 ...
随机推荐
- 查询SYS_ORG_TB树的层级
WITH N(SYS_ORG_ID,SYS_ORG_NAME,LEVEL) AS( AS LEVEL FROM SYS_ORG_TB WHERE SYS_ORG_UPID IS NULL UNION ...
- angularJS transclude
参考来源:彻底弄懂AngularJS中的transclusion 对以上文章进行摘录.总结和测试记录 在使用指令的时候,如果想要使用指令中的子元素,那么你就要用transclusion. 指令的DDO ...
- Java:清空文件内容
文章来源:https://www.cnblogs.com/hello-tl/p/9139432.html import java.io.*; public class FileBasicOperati ...
- GIL和copy
GIL: Global Interpreter Lock 全局解释器锁 多任务执行占CPU 多任务占用CPU的资源消耗:进程>线程>协程 在cpython解释器中只有进程是真的多任务,线程 ...
- 《算法导论》— Chapter 11 散列表
1 序 在很多应用中,都要用到一种动态集合结构,它仅支持INSERT.SEARCH以及DELETE三种字典操作.例如计算机程序设计语言的编译程序需要维护一个符号表,其中元素的关键字为任意字符串,与语言 ...
- 【HIHOCODER 1469 】福字(DP)
描述 新年到了,你收到了一副画.你想找到里面最大的福字. 一副画是一个n × n的矩阵,其中每个位置都是一个非负整数. 一个福字被定义成是大小为 k 的正方形,满足其中的每个位置上的数都恰好比他的左边 ...
- oracle自增序列创建
表atable(id,a) id需要自增 首先建立一个序列:create sequence seq_atable minvalue 1 maxvalue 999999999999999999 star ...
- Python MySQLdb 查询中文出现问号的解决方法
在连接数据库的时候设置如下即可: db = MySQLdb.connect('localhost','root','×××××','test',use_unicode=True,charset=&qu ...
- Go切片基础
package main import "fmt" //切片(Slice)本身没有数据,是对底层Array的一个view //不使用指针就可以改数组内容 //slice可以向后扩展 ...
- hdu 2295 dlx重复覆盖+二分答案
题目大意: 有一堆雷达工作站,安放至多k个人在这些工作站中,找到一个最小的雷达监控半径可以使k个工作人所在的雷达工作站覆盖所有城市 二分半径的答案,每次利用dlx的重复覆盖来判断这个答案是否正确 #i ...