UITableView
//转载请注明出处--本文永久连接:http://www.cnblogs.com/ChenYilong/p/3496969.htmlhtml
本文对应pdf文档下载连接,猛戳->:UITableView.pdf
1.6 MBweb
UITableViewapp
l
iOS
中显示数据列表最经常使用的一个控件,支持垂直滚动
数据源 (dataSource) 和代理 (delegate)
l UITableView 须要一个数据源 (dataSource) 来显示数据 , UITableView 会向数据源查询一共有多少行数据以及每一行显 示什么数据等。没有设置数据源的 UITableView 只是个空壳。凡 是遵照 UITableViewDataSource 协议的 OC 对象,均可以 是 UITableView 的数据源
l 一般都要为 UITableView 设置代理对象 (delegate), 以便 在 UITableView 触发一下事件时作出相应的处理,好比选中了某 一行。凡是遵照了 UITableViewDelegate 协议的 OC 对象,均可 以是 UITableView 的代理对象
l 通常会让控制器充当 UITableView 的 dataSource 和 delegate
UITableViewDataSource
l @required
u -(NSInteger) tableView :(UITableView*)tableView
numberOfRowsInSection :(NSInteger)section;
第 section 分区一共有多少行
u -(UITableViewCell*) tableView :(UITableView*)tableView cellForRowAtIndexPath :(NSIndexPath *)indexPath;
建立第 section 分区第 row 行的 UITableViewCell 对象 (indexPath 包含 了 section 和 row)
l @optional
u -(NSInteger) numberOfSectionsInTableView :(UITableView
*)tableView; 一共有多少个分区
u -(NSString*) tableView :(UITableView*)tableView
titleForHeaderInSection :(NSInteger)section; 第 section 分区的头部标题
UITableViewDataSource
u -(NSString*) tableView :(UITableView*)tableView titleForFooterInSection :(NSInteger)section;
第 section 分区的底部标题
u -(BOOL) tableView :(UITableView*)tableView
canEditRowAtIndexPath :(NSIndexPath *)indexPath;
某一行是否能够编辑 ( 删除 )
u -(BOOL) tableView :(UITableView*)tableView canMoveRowAtIndexPath :(NSIndexPath *)indexPath;
某一行是否能够移动来进行从新排序
u -(NSArray*) sectionIndexTitlesForTableView :(UITableView *)tableView;
UITableView 右边的索引栏的内容
UITableViewDelegate
l - (void) tableView :(UITableView *)tableView didSelectRowAtIndexPath :(NSIndexPath *)indexPath
选中了 UITableView 的某一行
l - (CGFloat) tableView :(UITableView *)tableView
heightForRowAtIndexPath :(NSIndexPath *)indexPath 某一行的高度
l - (CGFloat) tableView :(UITableView *)tableView heightForHeaderInSection :(NSInteger)section
第 section 分区头部的高度
l - (CGFloat) tableView :(UITableView *)tableView
heightForFooterInSection :(NSInteger)section 第 section 分区尾部的高度
UITableViewDelegate
l - (UIView *) tableView :(UITableView *)tableView viewForHeaderInSection :(NSInteger)section
第 section 分区头部显示的视图
l - (UIView *) tableView :(UITableView *)tableView
viewForFooterInSection :(NSInteger)section
第 section 分区尾部显示的视图
l - (NSInteger) tableView :(UITableView *)tableView indentationLevelForRowAtIndexPath :(NSIndexPath *)indexPath
设置每一行的等级缩进 ( 数字越小,等级越高 )
UITableViewCell
l UITableView 的每一行都是一个 UITableViewCell, 经过 dataSource 的 tableView : cellForRowAtIndexPath : 方法来初始化每一行
l UITableViewCell 是 UIView 的子类,内部有个默认的子视图 : contentView 。 contentView 是 UITableViewCell 所显示内容的父视图,并负责显示一些 辅助指示视图。辅助指示视图的做用是显示一个表示动做的图标,能够经过设 置 UITableViewCell 的 accessoryType 来显示,默认 是 UITableViewCellAccessoryNone( 不显示辅助指示视图 ) ,其余值以下 :
u UITableViewCellAccessoryDisclosureIndicator
u UITableViewCellAccessoryDetailDisclosureButton
UITableViewCell 的 contentView
l contentView 下默认有 3 个子视图,其中的 2 个是 UILabel( 通 过 UITableViewCell 的 textLabel 和 detailTextLabel 属性访问 ) ,第 3 个是 UIImageView( 经过 UITableViewCell 的 imageView 属性访问 )
l UITableViewCell 还有一个 UITableViewCellStyle 属性,用于决定使 用 contentView 的哪些子视图,以及这些子视图在 contentView 中的位置
UITableViewCellStyleDefault
UITableViewCellStyleSubtitle
UITableViewCellStyleValue1
UITableViewCellStyleValue2
UITableViewCell 对象的重用原理
l iOS 设备的内存有限,若是用 UITableView 显示成千上万条数据,就需 要成千上万个 UITableViewCell 对象的话,那将会耗尽 iOS 设备的 内存。要解决该问题,须要重用 UITableViewCell 对象
l 重用原理 :当滚动列表时,部分 UITableViewCell 会移出窗口 , UITableView 会将窗口外的 UITableViewCell 放入一个对象池中 ,等待重用。当 UITableView 要求 dataSource 返 回 UITableViewCell 时, dataSource 会先查看这个对象池,若是池 中有未使用的 UITableViewCell , dataSource 会用新的数据配置这 个 UITableViewCell ,而后返回给 UITableView ,从新显示到窗 口中,从而避免建立新对象
UITableViewCell 对象的重用原理
l 还有一个很是重要的问题:有时候须要自定义 UITableViewCell( 用一个子类 继承 UITableViewCell) ,并且每一行用的不必定是同一 种 UITableViewCell( 如短信聊天布局 ) ,因此一个 UITableView 可能拥有不 同类型的 UITableViewCell ,对象池中也会有不少不一样类型 的 UITableViewCell ,那么 UITableView 在重用 UITableViewCell 时可能 会获得错误类型的 UITableViewCell
l 解决方案 : UITableViewCell 有个 NSString * reuseIdentifier 属性,可 以在初始化 UITableViewCell 的时候传入一个特定的字符串标识来设 置 reuseIdentifier( 通常用 UITableViewCell 的类名 ) 。当 UITableView 要求 dataSource 返回 UITableViewCell 时,先经过一个字符串标识到对象池 中查找对应类型的 UITableViewCell 对象,若是有,就重用,若是没有,就传 入这个字符串标识来初始化一个 UITableViewCell 对象
一个 UITableView 中不一样类型的 UITableViewCell
重用 UITableViewCell 对象
- (UITableViewCell *) tableView :(UITableView *)tableView
cellForRowAtIndexPath :(NSIndexPath *)indexPath {
static NSString *identifier = @"UITableViewCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier :identifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle :UITableViewCellStyleDefault reuseIdentifier :identifier] autorelease];
}
cell.textLabel.text = [NSString stringWithFormat:@"Text %i",
indexPath.row];
return cell;
}
UITableViewCell 的经常使用属性
l 设置背景
u backgroundView
l 设置被选中时的背景视图
u selectedBackgroundView
l selectionStyle 属性可设置 UITableViewCell 被选中时的 背景颜色 : u UITableViewCellSelectionStyleNone 没有颜色
u UITableViewCellSelectionStyleBlue 蓝色(默认)
u UITableViewCellSelectionStyleGray 灰色
自定义 UITableViewCell
UITableView 经常使用方法
l - (id) dequeueReusableCellWithIdentifier :(NSString *)identifier
经过 identifier 在 ( 缓存 ) 池中找到对应的 UITableViewCell 对象
l - (void) deleteRowsAtIndexPaths :(NSArray *)indexPaths withRowAnimation :(UITableViewRowAnimation)animation
移除 indexPaths 范围内的全部行
l @property(nonatomic,readonly) UITableViewStyle style 表格样式
l @property(nonatomic,assign) id dataSource 数据源
l @property(nonatomic,assign) id delegate 代理
l @property(nonatomic,getter= isEditing ) BOOL editing 是否为编辑模式
l @property(nonatomic) UITableViewCellSeparatorStyle separatorStyle 设置分隔线的样式
l @property(nonatomic,retain) UIColor *separatorColor 设置分隔线的颜色
UITableView 经常使用方法
l @property(nonatomic,retain) UIView *tableHeaderView 表头显示的视图
l @property(nonatomic,retain) UIView *tableFooterView 表尾显示的视图
l @property(nonatomic) BOOL allowsSelection
是否容许选中行
l @property(nonatomic) BOOL allowsSelectionDuringEditing 是否容许在编辑模式下选中行
l @property(nonatomic) BOOL allowsMultipleSelection 是否容许选中多行
l @property(nonatomic) BOOL allowsMultipleSelectionDuringEditing 是否容许在编辑模式下选中多行
UITableViewController
l 是 UIViewController 的子类, UITableViewController 默认扮演了 3 种角色 : 视 图控制器、 UITableView 的数据源和代理
l UITableViewController 的 view 是个 UITablView, 由 UITableViewController 负责设置和显示这个对象。 UITableViewController 对象被建立后,会将这 个 UITableView 对象的 dataSource 和 delegate 指向 UITableViewController 本身




数据源 (dataSource) 和代理 (delegate)
l UITableView 须要一个数据源 (dataSource) 来显示数据 , UITableView 会向数据源查询一共有多少行数据以及每一行显 示什么数据等。没有设置数据源的 UITableView 只是个空壳。凡 是遵照 UITableViewDataSource 协议的 OC 对象,均可以 是 UITableView 的数据源
l 一般都要为 UITableView 设置代理对象 (delegate), 以便 在 UITableView 触发一下事件时作出相应的处理,好比选中了某 一行。凡是遵照了 UITableViewDelegate 协议的 OC 对象,均可 以是 UITableView 的代理对象
l 通常会让控制器充当 UITableView 的 dataSource 和 delegate


UITableViewDataSource
l @required
u -(NSInteger) tableView :(UITableView*)tableView
numberOfRowsInSection :(NSInteger)section;
第 section 分区一共有多少行
u -(UITableViewCell*) tableView :(UITableView*)tableView cellForRowAtIndexPath :(NSIndexPath *)indexPath;
建立第 section 分区第 row 行的 UITableViewCell 对象 (indexPath 包含 了 section 和 row)
l @optional
u -(NSInteger) numberOfSectionsInTableView :(UITableView
*)tableView; 一共有多少个分区
u -(NSString*) tableView :(UITableView*)tableView
titleForHeaderInSection :(NSInteger)section; 第 section 分区的头部标题

UITableViewDataSource
u -(NSString*) tableView :(UITableView*)tableView titleForFooterInSection :(NSInteger)section;
第 section 分区的底部标题
u -(BOOL) tableView :(UITableView*)tableView
canEditRowAtIndexPath :(NSIndexPath *)indexPath;
某一行是否能够编辑 ( 删除 )
u -(BOOL) tableView :(UITableView*)tableView canMoveRowAtIndexPath :(NSIndexPath *)indexPath;
某一行是否能够移动来进行从新排序
u -(NSArray*) sectionIndexTitlesForTableView :(UITableView *)tableView;
UITableView 右边的索引栏的内容

UITableViewDelegate
l - (void) tableView :(UITableView *)tableView didSelectRowAtIndexPath :(NSIndexPath *)indexPath
选中了 UITableView 的某一行
l - (CGFloat) tableView :(UITableView *)tableView
heightForRowAtIndexPath :(NSIndexPath *)indexPath 某一行的高度
l - (CGFloat) tableView :(UITableView *)tableView heightForHeaderInSection :(NSInteger)section
第 section 分区头部的高度
l - (CGFloat) tableView :(UITableView *)tableView
heightForFooterInSection :(NSInteger)section 第 section 分区尾部的高度

UITableViewDelegate
l - (UIView *) tableView :(UITableView *)tableView viewForHeaderInSection :(NSInteger)section
第 section 分区头部显示的视图
l - (UIView *) tableView :(UITableView *)tableView
viewForFooterInSection :(NSInteger)section
第 section 分区尾部显示的视图
l - (NSInteger) tableView :(UITableView *)tableView indentationLevelForRowAtIndexPath :(NSIndexPath *)indexPath
设置每一行的等级缩进 ( 数字越小,等级越高 )

UITableViewCell
l UITableView 的每一行都是一个 UITableViewCell, 经过 dataSource 的 tableView : cellForRowAtIndexPath : 方法来初始化每一行
l UITableViewCell 是 UIView 的子类,内部有个默认的子视图 : contentView 。 contentView 是 UITableViewCell 所显示内容的父视图,并负责显示一些 辅助指示视图。辅助指示视图的做用是显示一个表示动做的图标,能够经过设 置 UITableViewCell 的 accessoryType 来显示,默认 是 UITableViewCellAccessoryNone( 不显示辅助指示视图 ) ,其余值以下 :
u UITableViewCellAccessoryDisclosureIndicator

u UITableViewCellAccessoryDetailDisclosureButton

//转载请注明出处--本文永久连接:http://www.cnblogs.com/ChenYilong/p/3496969.html布局

UITableViewCell 的 contentView
l contentView 下默认有 3 个子视图,其中的 2 个是 UILabel( 通 过 UITableViewCell 的 textLabel 和 detailTextLabel 属性访问 ) ,第 3 个是 UIImageView( 经过 UITableViewCell 的 imageView 属性访问 )
l UITableViewCell 还有一个 UITableViewCellStyle 属性,用于决定使 用 contentView 的哪些子视图,以及这些子视图在 contentView 中的位置
UITableViewCellStyleDefault
UITableViewCellStyleSubtitle
UITableViewCellStyleValue1
UITableViewCellStyleValue2



UITableViewCell 对象的重用原理
l iOS 设备的内存有限,若是用 UITableView 显示成千上万条数据,就需 要成千上万个 UITableViewCell 对象的话,那将会耗尽 iOS 设备的 内存。要解决该问题,须要重用 UITableViewCell 对象
l 重用原理 :当滚动列表时,部分 UITableViewCell 会移出窗口 , UITableView 会将窗口外的 UITableViewCell 放入一个对象池中 ,等待重用。当 UITableView 要求 dataSource 返 回 UITableViewCell 时, dataSource 会先查看这个对象池,若是池 中有未使用的 UITableViewCell , dataSource 会用新的数据配置这 个 UITableViewCell ,而后返回给 UITableView ,从新显示到窗 口中,从而避免建立新对象

UITableViewCell 对象的重用原理
l 还有一个很是重要的问题:有时候须要自定义 UITableViewCell( 用一个子类 继承 UITableViewCell) ,并且每一行用的不必定是同一 种 UITableViewCell( 如短信聊天布局 ) ,因此一个 UITableView 可能拥有不 同类型的 UITableViewCell ,对象池中也会有不少不一样类型 的 UITableViewCell ,那么 UITableView 在重用 UITableViewCell 时可能 会获得错误类型的 UITableViewCell
l 解决方案 : UITableViewCell 有个 NSString * reuseIdentifier 属性,可 以在初始化 UITableViewCell 的时候传入一个特定的字符串标识来设 置 reuseIdentifier( 通常用 UITableViewCell 的类名 ) 。当 UITableView 要求 dataSource 返回 UITableViewCell 时,先经过一个字符串标识到对象池 中查找对应类型的 UITableViewCell 对象,若是有,就重用,若是没有,就传 入这个字符串标识来初始化一个 UITableViewCell 对象

一个 UITableView 中不一样类型的 UITableViewCell

重用 UITableViewCell 对象
- (UITableViewCell *) tableView :(UITableView *)tableView
cellForRowAtIndexPath :(NSIndexPath *)indexPath {
static NSString *identifier = @"UITableViewCell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier :identifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle :UITableViewCellStyleDefault reuseIdentifier :identifier] autorelease];
}
cell.textLabel.text = [NSString stringWithFormat:@"Text %i",
indexPath.row];
return cell;
}
//转载请注明出处--本文永久连接:http://www.cnblogs.com/ChenYilong/p/3496969.htmlpost

UITableViewCell 的经常使用属性
l 设置背景
u backgroundView
l 设置被选中时的背景视图
u selectedBackgroundView
l selectionStyle 属性可设置 UITableViewCell 被选中时的 背景颜色 : u UITableViewCellSelectionStyleNone 没有颜色
u UITableViewCellSelectionStyleBlue 蓝色(默认)
u UITableViewCellSelectionStyleGray 灰色

自定义 UITableViewCell
l
通常有两种方式
:
1 用一个 xib 文件来 表 述 UITableViewCell 的内容 在这设置字符串标识,以便重用
2 经过代码往 UITableViewCell 的 contentView 中添加子视图,在 初始化方法 ( 好比 init 、 initWithStyle:reuseIdentifier: ) 中添加子控件,在 layoutSubviews 方法中分配子控件的位置和大小
UITableView 的编辑模式
l UITableView 有个 editing 属性,设置为 YES 时,能够进入编辑模式。在编 辑模式下,能够管理表格中的行,好比改变行的排列顺序、增长行、删除行 ,但不能修改行的内容
l 多种方式开启编辑模式
u @property(nonatomic,getter=isEditing)BOOLediting
u -(void)setEditing:(BOOL)editinganimated:(BOOL)animated
删除 UITableView 的行
l 首先要开启编辑模式
l 实现 UITableViewDataSource 的以下方法:
- (void) tableView :(UITableView *)tableView commitEditingStyle :(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath :(NSIndexPath *)indexPath {
// 若是 UITableView 提 交的是删除指令
if (editingStyle == UITableViewCellEditingStyleDelete) {
// 删除真实数据
// [self.data removeObjectAtIndex:indexPath.row];
// 删除 UITableView 中的某一行 ( 带动画效果 )
[tableView deleteRowsAtIndexPaths:[NSArray
arrayWithObject:indexPath]
withRowAnimation:UITableViewRowAnimationLeft];
// 若是不考虑动画效果,也能够直接 [tableView reload]; }
}
移动 UITableView 的行
l 首先要开启编辑模式
l 实现 UITableViewDataSource 的以下方法 ( 若是没有实现此方法,将没法换行 )
- (void) tableView :(UITableView *)tableView moveRowAtIndexPath :(NSIndexPath *)sourceIndexPath toIndexPath :(NSIndexPath
*)destinationIndexPath {
int from = sourceIndexPath.row; int to = destinationIndexPath.row; if (from == to) return;
// 交换数据
// [self.data exchangeObjectAtIndex:from
withObjectAtIndex:to];
}
选中 UITableView 的行
l 当某行被选中时会调用此方法 (UITableViewDelegate 的方法 )
- (void) tableView :(UITableView *)tableView didSelectRowAtIndexPath :(NSIndexPath *)indexPath {
// 取消选中某一行 , 让被选中行的高亮颜色消失 ( 带动画效果 ) [tableView deselectRowAtIndexPath:indexPath
animated:YES];
}
1 用一个 xib 文件来 表 述 UITableViewCell 的内容 在这设置字符串标识,以便重用
2 经过代码往 UITableViewCell 的 contentView 中添加子视图,在 初始化方法 ( 好比 init 、 initWithStyle:reuseIdentifier: ) 中添加子控件,在 layoutSubviews 方法中分配子控件的位置和大小


UITableView 的编辑模式
l UITableView 有个 editing 属性,设置为 YES 时,能够进入编辑模式。在编 辑模式下,能够管理表格中的行,好比改变行的排列顺序、增长行、删除行 ,但不能修改行的内容
l 多种方式开启编辑模式
u @property(nonatomic,getter=isEditing)BOOLediting
u -(void)setEditing:(BOOL)editinganimated:(BOOL)animated


删除 UITableView 的行
l 首先要开启编辑模式
l 实现 UITableViewDataSource 的以下方法:
- (void) tableView :(UITableView *)tableView commitEditingStyle :(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath :(NSIndexPath *)indexPath {
// 若是 UITableView 提 交的是删除指令
if (editingStyle == UITableViewCellEditingStyleDelete) {
// 删除真实数据
// [self.data removeObjectAtIndex:indexPath.row];
// 删除 UITableView 中的某一行 ( 带动画效果 )
[tableView deleteRowsAtIndexPaths:[NSArray
arrayWithObject:indexPath]
withRowAnimation:UITableViewRowAnimationLeft];
// 若是不考虑动画效果,也能够直接 [tableView reload]; }

}
移动 UITableView 的行
l 首先要开启编辑模式
l 实现 UITableViewDataSource 的以下方法 ( 若是没有实现此方法,将没法换行 )
- (void) tableView :(UITableView *)tableView moveRowAtIndexPath :(NSIndexPath *)sourceIndexPath toIndexPath :(NSIndexPath
*)destinationIndexPath {
int from = sourceIndexPath.row; int to = destinationIndexPath.row; if (from == to) return;
// 交换数据
// [self.data exchangeObjectAtIndex:from
withObjectAtIndex:to];
}

选中 UITableView 的行
l 当某行被选中时会调用此方法 (UITableViewDelegate 的方法 )
- (void) tableView :(UITableView *)tableView didSelectRowAtIndexPath :(NSIndexPath *)indexPath {
// 取消选中某一行 , 让被选中行的高亮颜色消失 ( 带动画效果 ) [tableView deselectRowAtIndexPath:indexPath
animated:YES];
}

UITableView
经常使用方法
l - (id) initWithFrame :(CGRect)frame style :(UITableViewStyle)style 初始化一个 UITableView ,而且设置表格样式
l - (void) reloadData 从新访问数据源,刷新界面
l - (NSInteger) numberOfSections 分区的个数
l - (NSInteger) numberOfRowsInSection :(NSInteger)section
第 section 分区的行数
l - (UITableViewCell *) cellForRowAtIndexPath :(NSIndexPath *)indexPath
经过 indexPath 找到对应的 UITableViewCell 对象
l - (void) setEditing :(BOOL)editing animated :(BOOL)animated
是否要开启编辑模式
l - (void) deselectRowAtIndexPath :(NSIndexPath *)indexPath animated :(BOOL)animated
取消选中某一行 , 让被选中行的高亮颜色消失 ( 带动画效果 )
l - (id) initWithFrame :(CGRect)frame style :(UITableViewStyle)style 初始化一个 UITableView ,而且设置表格样式
l - (void) reloadData 从新访问数据源,刷新界面
l - (NSInteger) numberOfSections 分区的个数
l - (NSInteger) numberOfRowsInSection :(NSInteger)section
第 section 分区的行数
l - (UITableViewCell *) cellForRowAtIndexPath :(NSIndexPath *)indexPath
经过 indexPath 找到对应的 UITableViewCell 对象
l - (void) setEditing :(BOOL)editing animated :(BOOL)animated
是否要开启编辑模式
l - (void) deselectRowAtIndexPath :(NSIndexPath *)indexPath animated :(BOOL)animated
取消选中某一行 , 让被选中行的高亮颜色消失 ( 带动画效果 )

UITableView 经常使用方法
l - (id) dequeueReusableCellWithIdentifier :(NSString *)identifier
经过 identifier 在 ( 缓存 ) 池中找到对应的 UITableViewCell 对象
l - (void) deleteRowsAtIndexPaths :(NSArray *)indexPaths withRowAnimation :(UITableViewRowAnimation)animation
移除 indexPaths 范围内的全部行
l @property(nonatomic,readonly) UITableViewStyle style 表格样式
l @property(nonatomic,assign) id dataSource 数据源
l @property(nonatomic,assign) id delegate 代理
l @property(nonatomic,getter= isEditing ) BOOL editing 是否为编辑模式
l @property(nonatomic) UITableViewCellSeparatorStyle separatorStyle 设置分隔线的样式
l @property(nonatomic,retain) UIColor *separatorColor 设置分隔线的颜色
UITableView 经常使用方法
l @property(nonatomic,retain) UIView *tableHeaderView 表头显示的视图
l @property(nonatomic,retain) UIView *tableFooterView 表尾显示的视图
l @property(nonatomic) BOOL allowsSelection
是否容许选中行
l @property(nonatomic) BOOL allowsSelectionDuringEditing 是否容许在编辑模式下选中行
l @property(nonatomic) BOOL allowsMultipleSelection 是否容许选中多行
l @property(nonatomic) BOOL allowsMultipleSelectionDuringEditing 是否容许在编辑模式下选中多行

UITableViewController
l 是 UIViewController 的子类, UITableViewController 默认扮演了 3 种角色 : 视 图控制器、 UITableView 的数据源和代理
l UITableViewController 的 view 是个 UITablView, 由 UITableViewController 负责设置和显示这个对象。 UITableViewController 对象被建立后,会将这 个 UITableView 对象的 dataSource 和 delegate 指向 UITableViewController 本身


//转载请注明出处--本文永久连接:http://www.cnblogs.com/ChenYilong/p/3496969.html动画
本文对应pdf文档下载连接,猛戳->:https://www.evernote.com/shard/s227/sh/fbffb63f-55ba-441f-945e-5ba511812d0d/a0e328ca59db246f3926b92f52bf6d38ui
UITableView (PDF) |