UITableViewdataSourse的协议所有方法
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的协议所有方法的更多相关文章
- 02 http协议之方法与状态码
一:HTTP请求信息和响应信息的格式 请求: ()请求行 ()请求头信息 ()请求主体信息(可以没有) () 头信息结束后和主体信息之间要空一行 请求行又分3部分 请求方法 请求路径 所用的协议 请求 ...
- LoadRunner编写Socket协议脚本方法
本文主要介绍使用LoadRunner手工编写Windows Socket协议测试脚本的方法. 通过LoadRunner编写Windows Socket协议测试脚本,总体说来,比较简单.就像把大象放进冰 ...
- HTTP协议----请求方法和状态码
现在广泛使用的是HTTP/1.1版本,发布于1997年. 理解HTTP协议,首先从请求开始,比如: POST /form/entry HTTP/1.1 格式为: 请求方法 URI 协议版本 请求方法: ...
- 安卓开发学习笔记(五):史上最简单且华丽地实现Android Stutio当中Webview控件https/http协议的方法
一.我们先在XML当中自定义一个webview(Second_layout.xml) 代码如下: <?xml version="1.0" encoding="utf ...
- curl提示不支持https协议解决方法
根据网上的资料,这个问题的原因是因为在安装curl时使用默认安装,但是默认安装并不支持https协议 简单粗暴的办法就是,卸载重新安装curl(有一种方法是重新编译就可以了,然后使用编译后的可执行文件 ...
- http协议请求方法
解析HTTP协议六种请求方法get.put.post.delete.options和trace含义与区别. 1.GET selecr请求会向数据库发索取数据的请求,从而来获取信息,该请求就像数据库 ...
- VM安装后没有桥链接协议解决方法
从昨天到今天各种折腾的.网络就是各种不通,能使用的手段都上了,还是不行.奇怪的连DNS都ping不通. ping DNS时一致报: Destination Host Unreachable ... ...
- tcp协议传输方法&粘包问题
socket实现客户端和服务端 tcp协议可以用socket模块实现服务端可客户端的交互 # 服务端 import socket #生成一个socket对象 soc = socket.socket(s ...
- Http协议请求方法及body类型(思路比较清晰的)
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明.本文链接:https://blog.csdn.net/u010244522/article/de ...
随机推荐
- USACO section1.2 Transformation
/* ID: vincent63 LANG: C TASK: transform */ #include <stdio.h> #include<stdlib.h> #inclu ...
- Uva10082 WERTYU -S.B.S.
A common typing error is to place the hands on the keyboard one row to the right of the correct posi ...
- 2014 Super Training #1 B Fix 状压DP
原题: HDU 3362 http://acm.hdu.edu.cn/showproblem.php?pid=3362 开始准备贪心搞,结果发现太难了,一直都没做出来.后来才知道要用状压DP. 题意: ...
- HDU 1102 Constructing Roads
Constructing Roads Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Other ...
- 三维网格形变算法(Linear rotation-invariant coordinates和As-Rigid-As-Possible)
在三维网格形变算法中,个人比较喜欢下面两个算法,算法的效果都比较不错, 不同的是文章[Lipman et al. 2005]算法对控制点平移不太敏感.下面分别介绍这两个算法: 文章[Lipman et ...
- 什么是Activity
Activity 的生命周期是被以下的函数控制的.public class Activity extends ApplicationContext { protected void onCr ...
- java22 - 1 多线程之 单线程和多线程的图解
- GitHub入门之一:使用github下载项目
git作为目前比较流行的版本控制系统,被各个互联网公司广泛使用着.目前国外的网站有GitHub,国内的有CSDN和OSCHINA的git. 使用git可以很方便地进行多人协作和版本控制.作为一个入门小 ...
- mysqli预处理和事务处理
1 应用环境 mysqli预处理功能(大量数据处理时使用) 2 步骤 a)mysqli连接数据库 $mysqli = new mysqli('localhost','root','root','chu ...
- p点到(a,b)点两所在直线的垂点坐标及p点是否在(a,b)两点所在直线上
/// <summary> /// p点到(a,b)点两所在直线的垂点坐标 /// </summary> /// <p ...