UITableViewDataSource

@required
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section;分区一共有多少行
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath;
创建第section分区第row行的UITableViewCell对象(indexPath包含了section和row)

@optional
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView;
一共有多少个分区

- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section;
第section分区的头部标题

- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section;
第section分区的底部标题

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath;
某一行是否可以编辑(删除)

- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath;
某一行是否可以移动来进行重新排序

- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView;
UITableView右边的索引栏的内容

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
选中了UITableView的某一行

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
某一行的高度

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
第section分区头部的高度

- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section
第section分区尾部的高度

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
第section分区头部显示的视图

- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section
第section分区尾部显示的视图

- (NSInteger)tableView:(UITableView *)tableView indentationLevelForRowAtIndexPath:(NSIndexPath *)indexPath
设置每一行的等级缩进(数字越小,等级越高)

UITableViewdataSourse的协议所有方法的更多相关文章

  1. 02 http协议之方法与状态码

    一:HTTP请求信息和响应信息的格式 请求: ()请求行 ()请求头信息 ()请求主体信息(可以没有) () 头信息结束后和主体信息之间要空一行 请求行又分3部分 请求方法 请求路径 所用的协议 请求 ...

  2. LoadRunner编写Socket协议脚本方法

    本文主要介绍使用LoadRunner手工编写Windows Socket协议测试脚本的方法. 通过LoadRunner编写Windows Socket协议测试脚本,总体说来,比较简单.就像把大象放进冰 ...

  3. HTTP协议----请求方法和状态码

    现在广泛使用的是HTTP/1.1版本,发布于1997年. 理解HTTP协议,首先从请求开始,比如: POST /form/entry HTTP/1.1 格式为: 请求方法 URI 协议版本 请求方法: ...

  4. 安卓开发学习笔记(五):史上最简单且华丽地实现Android Stutio当中Webview控件https/http协议的方法

    一.我们先在XML当中自定义一个webview(Second_layout.xml) 代码如下: <?xml version="1.0" encoding="utf ...

  5. curl提示不支持https协议解决方法

    根据网上的资料,这个问题的原因是因为在安装curl时使用默认安装,但是默认安装并不支持https协议 简单粗暴的办法就是,卸载重新安装curl(有一种方法是重新编译就可以了,然后使用编译后的可执行文件 ...

  6. http协议请求方法

    解析HTTP协议六种请求方法get.put.post.delete.options和trace含义与区别. 1.GET   selecr请求会向数据库发索取数据的请求,从而来获取信息,该请求就像数据库 ...

  7. VM安装后没有桥链接协议解决方法

    从昨天到今天各种折腾的.网络就是各种不通,能使用的手段都上了,还是不行.奇怪的连DNS都ping不通. ping DNS时一致报:  Destination Host Unreachable ... ...

  8. tcp协议传输方法&粘包问题

    socket实现客户端和服务端 tcp协议可以用socket模块实现服务端可客户端的交互 # 服务端 import socket #生成一个socket对象 soc = socket.socket(s ...

  9. Http协议请求方法及body类型(思路比较清晰的)

    版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/u010244522/article/de ...

随机推荐

  1. hadoop core-site.xml

    <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="text ...

  2. 如何做好presentation

    1.全心投入 要么不做,要做就做好 承诺自己会花时间好好准备自己的演讲,投入专注的精力. 人们可以通过练习使自己成为很好的演讲者. 2分析你的观众 他们想听什么? 3.组织你的想法 让语言简单 让观众 ...

  3. cri-o 创建非infra容器

    1.// cri-o/server/container.go // CreateContainer creates a new container in specified PodSandbox fu ...

  4. hdu 1028 Ignatius and the Princess III 简单dp

    题目链接:hdu 1028 Ignatius and the Princess III 题意:对于给定的n,问有多少种组成方式 思路:dp[i][j],i表示要求的数,j表示组成i的最大值,最后答案是 ...

  5. 微信公众号开发之LBS

    百度地图Web服务api:http://lbsyun.baidu.com/index.php?title=webapi 1.测距 Route Matrix API v2.0:http://lbsyun ...

  6. jstat使用

    jstat -gcutil pid 统计gc信息统计.其中最后五项,分别是young gc的次数,young gc的时间,full gc的次数,full gc的时间,gc的总时间.

  7. Java Executor并发框架(三)ThreadPoolExecutor 队列缓存策略

    前面两篇讲解了线程池中线程创建后的运行情况,其中有一系列的策略来保证线程正常运行.但是我们知道线程池是可以设置容量的,而且这容量的设置也是至关重要的,如果容量设置的太小,那么将会影响系统的运行效率,如 ...

  8. java 14 -1 正则表达式

    正则表达式:符合一定规则的字符串. 1.判断QQ号码是否正确的案例: public class RegexDemo2 { public static void main(String[] args) ...

  9. [原创] NetBean开发c++程序指南1- 加入c++项目文件夹

    利用 NetBean开发c/c++程序,导入原有程序代码. 1. 在菜单栏的 "工具" -> 选项 -> c/c++开发 如果彩色就是激活的状态,否则选择激活. 2. ...

  10. 6月27日 OGDF不同的布局算法

    检查不同布局算法 备注 CircularLayout 可以非连通 FastMultipoleMultilevelEmbedder    FMMMLayout   可以非连通 StressMajoriz ...