当前位置:K88软件开发文章中心编程语言APP编程CrossApp → 文章内容

CATableViewDataSource

减小字体 增大字体 作者:佚名  来源:网上搜集  发布时间:2019-1-23 13:51:57

由 ?﹏???ζ???﹏﹏? 创建, 最后一次修改 2016-09-07 类说明CATableView的数据代理类,用于定义tableView的数据接口。CATableViewDataSource 方法(点击查看方法介绍)方法说明tableCellAtIndex获取指定celltableViewHeightForRowAtIndexPath获取指定的cell高度numberOfRowsInSection获取对应的section所包含的cell个数numberOfSections获取tableview包含的section个数tableViewSectionViewForHeaderInSection在tableView中通过索引获取头部SectiontableViewHeightForHeaderInSection在tableView中通过索引获取头部Section高度tableViewSectionViewForFooterInSection在tableView中通过索引获取尾部SectiontableViewHeightForFooterInSection在tableView中通过索引获取尾部Section高度tableViewWillDisplayCellAtIndex回调当前将要显示的tableViewCATableViewDataSource 方法说明virtual CATableViewCell* tableCellAtIndex(CATableView* table, const DSize& cellSize, unsigned int section, unsigned int row) = 0;返回值:CATableViewCell* 参数:类型参数名说明CATableView*table当前tableViewconst DSize&cellSizecell的sizeunsigned intsectioncell所属的区域unsigned introwcell所在行数解释:获取指定cellvirtual unsigned int tableViewHeightForRowAtIndexPath(CATableView* table, unsigned int section, unsigned int row) = 0;返回值:unsigned int参数:类型参数名说明CATableView*table当前tableViewunsigned intsectioncell所属的区域unsigned introwcell所在行数解释:获取指定的cell高度virtual unsigned int numberOfRowsInSection(CATableView* table, unsigned int section) = 0;返回值:unsigned int参数:类型参数名说明CATableView*table当前tableViewunsigned intsectioncell所属的区域解释:获取对应的section所包含的cell个数virtual unsigned int numberOfSections(CATableView* table);返回值:unsigned int参数:类型参数名说明CATableView*table当前tableView解释:获取tableview包含的section个数virtual CAView* tableViewSectionViewForHeaderInSection(CATableView* table, const DSize& viewSize, unsigned int section);返回值:CAView*参数:类型参数名说明CATableView*table当前tableViewconst DSize&viewSizeview的sizeunsigned intsectioncell所属的区域解释:在tableView中通过索引获取头部Sectionvirtual unsigned int tableViewHeightForHeaderInSection(CATableView* table, unsigned int section);返回值:unsigned int参数:类型参数名说明CATableView*table当前tableViewconst DSize&cellSizecell的size解释:在tableView中通过索引获取头部Section高度virtual CAView* tableViewSectionViewForFooterInSection(CATableView* table, const DSize& viewSize, unsigned int section);返回值:CAView*参数:类型参数名说明CATableView*table当前tableViewconst DSize&viewSizeview的sizeunsigned intsectioncell所属的区域解释:在tableView中通过索引获取尾部Sectionvirtual unsigned int tableViewHeightForFooterInSection(CATableView* table, unsigned int section);返回值:unsigned int参数:类型参数名说明CATableView*table当前tableViewunsigned intsectioncell所属的区域解释:在tableView中通过索引获取尾部Section高度virtual void tableViewWillDisplayCellAtIndex(CATableView* table, CATableViewCell* cell, unsigned int section, unsigned int row) {};返回值:void参数:类型参数名说明CATableView*table当前tableViewCATableViewCell*cellcellunsigned intsectioncell所属的区域unsigned introwcell所在行数解释:回调当前将要显示的tableView

CATableViewDataSource