iOS中UITableView使用指南
来源:互联网 发布:js 双击截图事件 编辑:程序博客网 时间:2024/06/06 07:41
UITableView控件在iOS开发中是使用最多的控件之一,所以我们有必要对她的使用加以理解:
1、首先要使用UITableView控件,应该实现UICollectionViewDataSource,UICollectionViewDelegate这两个代理
2、
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section; 返回列表中有多少个项在节中
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath; 为cell添加内容
(BOOL)collectionView:(UICollectionView *)collectionView shouldHighlightItemAtIndexPath:(NSIndexPath *)indexPath;
- (void)collectionView:(UICollectionView *)collectionView didHighlightItemAtIndexPath:(NSIndexPath *)indexPath;
- (void)collectionView:(UICollectionView *)collectionView didUnhighlightItemAtIndexPath:(NSIndexPath *)indexPath;
- (BOOL)collectionView:(UICollectionView *)collectionView shouldSelectItemAtIndexPath:(NSIndexPath *)indexPath;
- (BOOL)collectionView:(UICollectionView *)collectionView shouldDeselectItemAtIndexPath:(NSIndexPath *)indexPath; // called when the user taps on an already-selected item in multi-select mode
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath;
- (void)collectionView:(UICollectionView *)collectionView didDeselectItemAtIndexPath:(NSIndexPath *)indexPath;
- (void)collectionView:(UICollectionView *)collectionView willDisplayCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPathNS_AVAILABLE_IOS(8_0);
- (void)collectionView:(UICollectionView *)collectionView willDisplaySupplementaryView:(UICollectionReusableView *)view forElementKind:(NSString *)elementKind atIndexPath:(NSIndexPath *)indexPathNS_AVAILABLE_IOS(8_0);
- (void)collectionView:(UICollectionView *)collectionView didEndDisplayingCell:(UICollectionViewCell *)cell forItemAtIndexPath:(NSIndexPath *)indexPath;
- (void)collectionView:(UICollectionView *)collectionView didEndDisplayingSupplementaryView:(UICollectionReusableView *)view forElementOfKind:(NSString *)elementKind atIndexPath:(NSIndexPath *)indexPath;
// These methods provide support for copy/paste actions on cells.
// All three should be implemented if any are.
- (BOOL)collectionView:(UICollectionView *)collectionView shouldShowMenuForItemAtIndexPath:(NSIndexPath *)indexPath;
- (BOOL)collectionView:(UICollectionView *)collectionView canPerformAction:(SEL)action forItemAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender;
- (void)collectionView:(UICollectionView *)collectionView performAction:(SEL)action forItemAtIndexPath:(NSIndexPath *)indexPath withSender:(id)sender;
// support for custom transition layout
- (UICollectionViewTransitionLayout *)collectionView:(UICollectionView *)collectionView transitionLayoutForOldLayout:(UICollectionViewLayout *)fromLayout newLayout:(UICollectionViewLayout *)toLayout;
如果普通的cell不能满足要求的话,那么可以利用代码或者IB直接自定义cell
- iOS中UITableView使用指南
- uitableview使用指南
- UITableView使用指南
- IOS 中UITableView使用
- UITableView使用指南1
- UITableView使用指南1
- iOS中UITableView性能优化
- iOS中UITableView性能优化
- IOS中UITableView使用总结
- IOS中UITableView使用总结
- iOS中CocoaPods安装和使用指南
- iOS中UITableView中使用总结
- UITableView使用指南(呕心原创)
- UITableView使用指南(呕心原创)
- iOS 去除UITableView中多余的separator
- iOS - UITableView中 Header上小技巧:
- iOS中UITableView学习笔记(一)
- ios UITableView中Cell的重用机制
- 哈希ELFhash
- ubuntu gnome 版本查看
- 2002
- ListView设置emptyView的限制
- 谁该为“华丽”埋单?
- iOS中UITableView使用指南
- 吸费电话代理 加值电话吸费 无学历要求
- 回溯算法
- 天声人語 20150118
- 好插件(移动骨架)mobilebone.js
- ural 1017. Staircases
- 加盟吸费电话 代理声讯电话 电话群呼器
- 日经春秋 20150118
- 日经社説 20150118 「大阪都」の具体像をもっと