Tip:

p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Times; min-height: 14.0px }
p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px "Songti SC" }
p.p3 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Times }
span.s1 { }
span.s2 { font: 12.0px "Songti SC" }
span.s3 { font: 12.0px Times }
td.td1 { width: 85.0px; margin: 0.5px 0.5px 0.5px 0.5px; padding: 1.0px 1.0px 1.0px 1.0px }
td.td2 { width: 689.0px; margin: 0.5px 0.5px 0.5px 0.5px; padding: 1.0px 1.0px 1.0px 1.0px }
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Times; min-height: 14.0px }
p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px }
p.p3 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px "Songti SC" }
p.p4 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px "Times New Roman"; min-height: 15.0px }
p.p5 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; line-height: 14.0px; font: 12.0px Times }
p.p6 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; line-height: 14.0px; font: 12.0px "Times New Roman"; min-height: 15.0px }
p.p7 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; line-height: 14.0px; font: 12.0px "Songti SC" }
p.p8 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; line-height: 14.0px; font: 12.0px "Times New Roman" }
p.p9 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; font: 12.0px "Times New Roman"; min-height: 15.0px }
span.s1 { }
span.s2 { font: 12.0px "Songti SC" }
span.s3 { font: 12.0px Times }
span.s4 { font: 12.0px "Times New Roman" }
table.t1 { width: 774.0px; border-collapse: collapse }
td.td1 { width: 85.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #cbcbcb #cbcbcb #cbcbcb #cbcbcb; padding: 0.0px 5.0px 0.0px 5.0px }
td.td2 { width: 689.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #cbcbcb #cbcbcb #cbcbcb #cbcbcb; padding: 0.0px 5.0px 0.0px 5.0px }

p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Times; min-height: 14.0px }
p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px }
p.p3 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px "Songti SC" }
p.p4 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px "Times New Roman"; min-height: 15.0px }
p.p5 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; line-height: 14.0px; font: 12.0px Times }
p.p6 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; line-height: 14.0px; font: 12.0px "Songti SC" }
p.p7 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; line-height: 14.0px; font: 12.0px "Times New Roman" }
p.p8 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; line-height: 14.0px; font: 12.0px "Times New Roman"; min-height: 15.0px }
p.p9 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; font: 12.0px "Times New Roman"; min-height: 15.0px }
span.s1 { }
span.s2 { font: 12.0px "Songti SC" }
span.s3 { font: 12.0px Times }
span.s4 { font: 12.0px "Times New Roman" }
table.t1 { width: 774.0px; border-collapse: collapse }
td.td1 { width: 85.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #cbcbcb #cbcbcb #cbcbcb #cbcbcb; padding: 0.0px 5.0px 0.0px 5.0px }
td.td2 { width: 689.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #cbcbcb #cbcbcb #cbcbcb #cbcbcb; padding: 0.0px 5.0px 0.0px 5.0px }

属性

frame-------------设置控件的位置和大小

backgroundColor-------------设置控件的颜色

style-------------获取表视图的样式

dataSource-------------设置UITableViewDataSource的代理

delegate-------------设置UITableViewDelegate代理

sectionHeaderHeight-------------设置组表视图的头标签高度

sectionFooterHeight-------------设置级表视图的尾标签高度

backgroundView-------------设置背景视图,只能写入

editing-------------是否允许编辑,默认是NO

allowsSelection-------------在非编辑下,行是否可以选中,默认为YES

allowsSelectionDuringEditing-------------控制某一行时,是否可以编辑,默认为NO

allowsMultipleSelection-------------是否可以选择多行,默认为NO

allowsMutableSelectionDuringEditing-------------在选择多行的情况下,是否可以编辑,默认为NO

sectionIndexMinimumDispl  ayRowCount-------------显示某个组索引列表在右边当行数达到这个值,默认是NSInteger的最大值

sectionIndexColor-------------选择某个部分的某行改变这一行上文本的颜色

sectionIndexTrackingBackgroundColor-------------设置选中某个部分的背景颜色

separatorStyle-------------设置单元格分隔线的样式

separatorColor-------------设置选中单元格分隔线的颜色

tableHeaderView-------------设置组表的头标签视图

tableFooterView-------------设置组表的尾标签视图

UITableView类目属性

section-------------获取当前在哪个组内

row-------------获取当前单元格是第几行

方法:

初始化方法:

initWithFrame:-------------设置表的大小和位置

initWithFrame:style-------------设置表的大小,位置和样式(组,单一)

setEditing:-------------表格进入编辑状态,无动画

setEditing: animated:-------------表格进入编辑状态,有动画

reloadData-------------刷新整个表视图

reloadSectionIndexTitles  -------------刷新索引栏

numberOfSections-------------获取当前所有的组

numberOfRowsInSection:-------------获取某个组有多少行

rectForSection:-------------获取某个组的位置和大小

rectForHeaderInSection:-------------获取某个组的头标签的位置和大小

rectForFooterInSection:-------------获取某个组的尾标签的位置和大小

rectForRowAtIndex:-------------获取某一行的位置和大小

indexPathForRowAtPoint-------------点击某一个点,判断是在哪一行上的信息。

indexPathForCell:-------------获取单元格的信息

indexPathsForRowsInRect:-------------在某个区域里会返回多个单元格信息

cellForRowAtIndexPath:-------------通过单元格路径得到单元格

visibleCells-------------返回所有可见的单元格

indexPathsForVisibleRows  -------------返回所有可见行的路径

headerViewForSection:-------------设置头标签的视图

footerViewForSection -------------设置尾标签的视图

beginUpdates-------------只添加或删除才会更新行数

endUpdates-------------添加或删除后会调用添加或删除方法时才会更新

insertSections:withRowAnimation:-------------插入一个或多个组,并使用动画

insertRowsIndexPaths:withRowAnimation:-------------插入一个或多个单元格,并使用动画

deleteSections:withRowAnimation:-------------删除一个或多个组,并使用动画

deleteRowIndexPaths:withRowAnimation:-------------删除一个或多个单元格,并使用动画

reloadSections:withRowAnimation:-------------更新一个或多个组,并使用动画

reloadRowIndexPaths:withRowAnimation:-------------更新一个或多个单元格,并使用动画

moveSection:toSection:-------------移动某个组到目标组位置

moveRowAtIndexPath:toIndexPath:-------------移动个某个单元格到目标单元格位置

indexPathsForSelectedRow -------------返回选择的一个单元格的路径

indexPathsForSelectedRows-------------返回选择的所有的单元格的路径

selectRowAtIndexPath:animation:scrollPosition-------------设置选中某个区域内的单元格

deselectRowAtIndexPath:animation:-------------取消选中的单元格

重用机制

dequeueReusableCellWithI  dentifier:-------------获取重用队列里的单元格

UITableViewDataSource代理方法:

方法:

numberOfSectionsInTableView:-------------设置表格的组数

tableView:numberOfRowInSection:-------------设置每个组有多少行

tableView:cellForRowAtIndexPath:-------------设置单元格显示的内容

tableView:titleForHeaderInSection:-------------设置组表的头标签视图

tableView:titleForFooterInSection:-------------设置组表的尾标签视图

tableView:canEditRowAtIndexPath:-------------设置单元格是否可以编辑

tableView:canMoveRowAtIndexPath:-------------设置单元格是否可以移动

tableView:sectionIndexTitleForTableView:atIndex:-------------设置指定组的表的头标签文本

tableView:commitEditingStyle:forRowAtIndexPath:-------------编辑单元格(添加,删除)

tableView:moveRowAtIndexPath:toIndexPath-------------单元格移动

UITableViewDelegate代理方法:

tableView: willDisplayCell:

forRowAtIndexPath:-------------设置当前的单元格

tableView: heightForRowAtIndexPath:-------------设置每行的高度

tableView:tableViewheightForHeaderInSection  :-------------设置组表的头标签高度

tableView:tableViewheightForFooterInSection  :-------------设置组表的尾标签高度

tableView: viewForHeaderInSection:-------------自定义组表的头标签视图

tableView: viewForFooterInSection: -------------自定义组表的尾标签视图

tableView:accessoryButtonTappedFor  RowWithIndexPath:-------------设置某个单元格上的右指向按钮的响应方法

tableView:

willSelectRowAtIndexPath  :-----------获取将要选择的单元格的路径

tableView:didSelectRowAtIndexPath:-----------获取选中的单元格的响应事件

tableView: tableViewwillDeselectRowAtIndexPath:------------获取将要未选中的单元格的路径

tableView:didDeselectRowAtIndexPath:-----------获取未选中的单元格响应事件

执行顺序如下:

第一轮:

1、numberOfSectionsInTableView  :假如section=2,此函数只执行一次,假如section=0,下面函数不执行,默认为1

2、heightForHeaderInSection,执行两次,此函数执行次数为section数目

3、heightForFooterInSection,函数属性同上,执行两次

4、numberOfRowsInSection,此方法执行一次

5、heightForHeaderInSection,此方法执行了两次,我其实有点困惑为什么这里还要调用这个方法

6、heightForFooterInSection,此方法执行两次,

7、numberOfRowsInSection,执行一次

8、heightForRowAtIndexPath ,行高,先执行section=0,对应的row次数

第二轮:

1、numberOfSectionsInTableView ,一次

2、heightForHeaderInSection,section次数

3、heightForFooterInSection,section次数

4、numberOfRowsInSection,一次

5、heightForHeaderInSection,执行section次数

6、heightForFooterInSection,执行section次数

7、numberOfRowsInSection,执行一次

8、heightForRowAtIndexPath,行高,先执行一次

9、cellForRowAtIndexPath

10、willDisplayCell

然后8、9、10依次执行直到所有的cell被描画完毕

UITableView的全部属性、方法以及代理方法执行顺序

p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Times; min-height: 14.0px }
p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px }
p.p3 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px "Songti SC" }
p.p4 { margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px "Times New Roman"; min-height: 15.0px }
p.p5 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; line-height: 14.0px; font: 12.0px Times }
p.p6 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; line-height: 14.0px; font: 12.0px "Songti SC" }
p.p7 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; line-height: 14.0px; font: 12.0px "Times New Roman" }
p.p8 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; line-height: 14.0px; font: 12.0px "Times New Roman"; min-height: 15.0px }
p.p9 { margin: 0.0px 0.0px 0.0px 0.0px; text-align: justify; font: 12.0px "Times New Roman"; min-height: 15.0px }
span.s1 { }
span.s2 { font: 12.0px "Songti SC" }
span.s3 { font: 12.0px Times }
span.s4 { font: 12.0px "Times New Roman" }
table.t1 { width: 774.0px; border-collapse: collapse }
td.td1 { width: 85.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #cbcbcb #cbcbcb #cbcbcb #cbcbcb; padding: 0.0px 5.0px 0.0px 5.0px }
td.td2 { width: 689.0px; border-style: solid; border-width: 1.0px 1.0px 1.0px 1.0px; border-color: #cbcbcb #cbcbcb #cbcbcb #cbcbcb; padding: 0.0px 5.0px 0.0px 5.0px }

[OC][转]UITableView属性及方法大全的更多相关文章

  1. Android零基础入门第22节:ImageView的属性和方法大全

    原文:Android零基础入门第22节:ImageView的属性和方法大全 通过前面几期的学习,TextView控件及其子控件基本学习完成,可以在Android屏幕上显示一些文字或者按钮,那么从本期开 ...

  2. Android零基础入门第17节:Android开发第一个控件,TextView属性和方法大全

    原文:Android零基础入门第17节:Android开发第一个控件,TextView属性和方法大全 前面简单学习了一些Android UI的一些基础知识,那么接下来我们一起来详细学习Android的 ...

  3. OC中的属性、方法及内存管理

    普通方法:关注(代表)对象可以”干什么”,过程中需要实例变量.-(void)show;输出 … 访问属性    属性:属性专门处理实例变量.(程序执行过程当中)    初始化方法:一创建对象(第一时间 ...

  4. EXTJS 3.0 资料 控件之 GridPanel属性与方法大全

    1.Ext.grid.GridPanel 主要配置项: store:表格的数据集 columns:表格列模式的配置数组,可自动创建ColumnModel列模式 autoExpandColumn:自动充 ...

  5. UITableView属性和方法

    1.初始化一个UITableView - (id)initWithFrame:(CGRect)frame style:(UITableViewStyle)style struct CGRect { C ...

  6. Flask类的属性和方法大全

    Flask Property__class____dict____doc____module__app_ctx_globals_classconfig_classdebugdefault_config ...

  7. Html中video的属性和方法大全

    <video>标签的属性 src :视频的属性 poster:视频封面,没有播放时显示的图片 preload:预加载 autoplay:自动播放 loop:循环播放 controls:浏览 ...

  8. UITableView类用法大全:UITableView属性

    [storyboard创建tableView步骤] 1.设置根视图 2.选中视图,设置导航栏editor/embed in/navigationcontroller 3.cell设置Identifie ...

  9. UITableView常用属性和方法 - 永不退缩的小白菜

    UITableView常用属性和方法 - 永不退缩的小白菜 时间 2014-05-27 01:21:00  博客园精华区原文  http://www.cnblogs.com/zhaofucheng11 ...

随机推荐

  1. tomcat由浅入深

    零.服务器.Servlet容器.web容器 Servlet容器:能够运行Servlet的环境叫做Servlet容器 web容器:能够运行web应用的环境就叫做web容器 weblogic websph ...

  2. python gevent 协程

    简介 没有切换开销.因为子程序切换不是线程切换,而是由程序自身控制,没有线程切换的开销,因此执行效率高, 不需要锁机制.因为只有一个线程,也不存在同时写变量冲突,在协程中控制共享资源不加锁,只需要判断 ...

  3. Yaf(Yet Another Framework)用户手册 yii框架手册

    地址:http://www.laruence.com/manual/ yaf框架手册:http://pan.baidu.com/s/1bnHFPHd yii框架手册:http://pan.baidu. ...

  4. ios 三种对话框拉伸方法

  5. ASP.NET corrupt assembly “Could not load file or assembly App_Web_*

    以下是从overFlow 复制过来的问题 I've read through many of the other questions posted on the same issue, but I s ...

  6. 安装hadoop集群服务器(hadoop1.2.1)

    摘要:hadoop,一个分布式系统基础架构,可以充分利用集群的威力进行高速运算和存储.本文主要介绍hadoop的安装与集群服务器的配置. 准备文件: ▪ VMware11.0.0      ▪ Cen ...

  7. $.Callbacks()

    <script> var cb = $.Callbacks(); //Callbacks(option) 有4个参数,可以多个参数写一起,空格分隔开 //once 多个fire() 只触发 ...

  8. java方法与构造

    public class StaticClass { static int i = 50; int y; // 构造只能有访问修饰符public.protected.private 修饰 (访问修饰符 ...

  9. C++之检测文件结尾

    当使用文件作为输入流时,为了确保适时的结束文件读取操作,程序要靠检查文件尾来判断该何时停止读取.常用的检查文件尾方法有两种: 两种方式均已将 fin 与文件关联,即 均已声明 fin 输入流,并已调用 ...

  10. win8 win10 安装msi 提示2502、2503的错误代码

    前言: 归根到底是权限不够导致的.win7应该不会有这个问题.   问题发生: 换了个电脑,装个win10预览版玩玩,发现python的msi安装文件安装不了.错误代码是2502.   其实我已经在w ...