Configuring a Table View //配置表格

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath //给予数据源指定indexPath位置的Cell元素(required method)
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView //给予数据源整个table包含的section数,默认为1
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section //给予数据源指定section所包含的Cell数(required method)
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView //给予数据源section的标题列表,与右侧的索引栏有关
- (NSInteger)tableView:(UITableView *)tableView sectionForSectionIndexTitle:(NSString *)title atIndex:(NSInteger)index //给予数据源真实的section与索引列表之间的关系,可以决定哪些section被索引栏引用
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section //给予数据源section的标题,nil为无标题
- (NSString *)tableView:(UITableView *)tableView titleForFooterInSection:(NSInteger)section //给予数据源section的尾部标题,nil为无标题

Inserting or Deleting Table Rows //插入或删除列

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath //当用户操作tableCell默认的添加或删除按钮时会触发该委托,editingStyle是个枚举,包含UITableViewCellEditingStyleInsert和UITableViewCellEditingStyleDelete
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath //告诉数据源该cell能否启用编辑模式,YES是

Reordering Table Rows //重排表格列

- (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath //告诉数据源该cell能否启用重排模式,YES是
- (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath //告诉数据源指定row移动到什么位置

转载于:https://www.cnblogs.com/cat3/archive/2013/04/01/2993746.html

UITableViewDataSource Protocol Reference相关推荐

  1. modbus3-关于Modicon Modbus Protocol和modscan32

    Modbus 是Modicon 家的东东,所有的规矩都要它说了算. 先看一下modscan32对上文的设备的测试结果 01. 监视到串口的数据如下: 发出:01 01 00 00 00 03 7C 0 ...

  2. iOS-Core Bluetooth Background Processing for iOS Apps(API Reference) the fifth part

    Core Bluetooth Background Processing for iOS Apps 对于iOS程序,它是至关重要的,它知道你的app是否在前台后者后台运行.一个app后台比前台必须是行 ...

  3. 【Xamarin笔记】Events, Protocols and Delegates

    Events, Protocols and Delegates   事件.协议和委托 This article presents the key iOS technologies used to re ...

  4. IOS学习笔记(九)之UIAlertView(警告视图)和UIActionSheet(操作表视图)基本概念和使用方法...

    IOS学习笔记(九)之UIAlertView(警告视图)和UIActionSheet(操作表视图)基本概念和使用方法 Author:hmjiangqq Email:jiangqqlmj@163.com ...

  5. iOS判断UIWebView加载完成的方法

    UIWebview不同于WkWebview没有加载进度属性来判断加载是否完成了 它有个回调方法 - (void)webViewDidFinishLoad:(UIWebView *)webView; 这 ...

  6. STM32开发 -- YModem详解

    如需转载请注明出处:https://blog.csdn.net/qq_29350001/article/details/87858582 对 YModem 的接触,只是在无网络的情况下,使用Secur ...

  7. 关于 XIB 和 NIB

    NIB 和 XIB 的区别与联系 NIB 和 XIB 都是 Interface Builder 的图形界面设计文档.引用<Cocoa Programming for Mac OSX>一书的 ...

  8. NSObject中的performSelector用法简介

    - (id)performSelector:(SEL)aSelector Description [说明] Sends a specified message to the receiver and ...

  9. 欢迎使用 QEMU 的文档!| 目录

    Welcome to QEMU's documentation! - QEMU documentationhttps://qemu-project.gitlab.io/qemu/ About QEMU ...

最新文章

  1. hdu1874 畅通project续 最短路 floyd或dijkstra或spfa
  2. [HTML/CSS]margin属性用法
  3. [转载]Apache之Hadoop学习:初识hadoop
  4. 最短路径 的一些解法和特殊情况
  5. ServletContext2
  6. CentOS 7下搭建配置 SVN 服务器
  7. [置顶] Android adb root权限
  8. LNMP之NGINX篇
  9. c语言中如何确保一个程序是单例的_c++单例模式
  10. 数据挖掘的方法有哪些?
  11. 数说海南——简单分析海南各市县近六年人口吸引力情况
  12. 卸载office2016密钥
  13. Sql Server数据库的作用与概述
  14. 关于 Windows 桌面图标显示为空白的解决方法
  15. 《Understanding the Effective Receptive Field in Deep Convolutional Neural Networks》理解深卷积神经网络中的有效感受野
  16. 联想ThinkPad装window10系统
  17. 二叉树:叶节点的一些操作
  18. java接口支持ajax,【JavaWeb】jQuery对Ajax的支持
  19. PHP项目开发案例全程实录pdf
  20. 表单验证使用注解@Valid

热门文章

  1. 奶粉中的php是什么,婴儿配方奶粉的分类及用途
  2. BicycleGAN详解与实现
  3. java 记录考勤记录_Java中的记录器– Java记录示例
  4. matlab 运算子图_PHP运算子
  5. c ++基本数据类型_C ++中的数据类型
  6. 斯威夫特山地车_斯威夫特枚举
  7. java des算法_Java DES算法程序
  8. Android版式– LinearLayout,RelativeLayout
  9. FE.ES-理解Event Loop
  10. 《Timing is Almost Everything》作者访谈