在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
类说明 CACollectionView的数据代理 CACollectionViewDataSource 方法(点击查看方法介绍)
CACollectionViewDataSource 方法说明 virtual CACollectionViewCell* collectionCellAtIndex(CACollectionView *collectionView, const DSize& cellSize, unsigned int section, unsigned int row, unsigned int item) 返回值:virtual CACollectionViewCell* 参数:
解释:获取指定cell 示例:
virtual unsigned int collectionViewHeightForRowAtIndexPath(CACollectionView* collectionView, unsigned int section, unsigned int row) 返回值:virtual unsigned int 参数:
解释:cell的高度 virtual unsigned int numberOfItemsInRowsInSection(CACollectionView *collectionView, unsigned int section, unsigned int row) 返回值:virtual unsigned int 参数:
解释:每个cell里的item数量 virtual unsigned int numberOfRowsInSection(CACollectionView *collectionView, unsigned int section) 返回值:virtual unsigned int 参数:
解释:获取对应的section所包含的cell个数 virtual unsigned int numberOfSections(CACollectionView *collectionView) 返回值:virtual unsigned int 参数:
解释:获取tableview包含的section个数 virtual CAView* collectionViewSectionViewForHeaderInSection(CACollectionView *collectionView, const DSize& viewSize, unsigned int section) 返回值:virtual CAView* 参数:
解释:headerView的内容 virtual unsigned int collectionViewHeightForHeaderInSection(CACollectionView *collectionView, unsigned int section) 返回值:virtual unsigned int 参数:
解释:每个section的headerView virtual CAView* collectionViewSectionViewForFooterInSection(CACollectionView *collectionView, const DSize& viewSize, unsigned int section) 返回值:virtual CAView* 参数:
解释:footerView的内容 virtual unsigned int collectionViewHeightForFooterInSection(CACollectionView *collectionView, unsigned int section) 返回值:virtual unsigned int 参数:
解释:每个section的footerView virtual void collectionViewWillDisplayCellAtIndex(CACollectionView* table, CACollectionViewCell* cell, unsigned int section, unsigned int row, unsigned int item) {}; 返回值:virtual void 参数:
解释:回调当前将要显示的Collection |
请发表评论