UICollectionView

简介: UICollectionView
//图集delegate
- (NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{
    return 1;
}
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
   // NSMutableArray *sectionArray = [self.dataArray objectAtIndex:section];
    if(m_tujiList==nil)
        return 0;
    return [m_tujiList count];
}
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{
    static NSString *SimpleTableIdentifier=@"TujiCollCell";
  TujiCollCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:SimpleTableIdentifier forIndexPath:indexPath];
    return cell;
}
UINib *cellNib = [UINib nibWithNibName:@"TujiCollCell" bundle:nil];
    [m_collectionView registerNib:cellNib forCellWithReuseIdentifier:@"TujiCollCell"];
相关文章
|
3月前
|
开发者 iOS开发
介绍 UITableView 和 UICollectionView,它们的区别是什么?
介绍 UITableView 和 UICollectionView,它们的区别是什么?
58 0
UINavigationBar-使用总结
UINavigationBar-使用总结
83 0
UITableViewCell和UICollectionViewCell自适应高度
UITableView和UICollectionView想通,此处就已UITableView为例
185 0
UITableViewCell和UICollectionViewCell自适应高度
UICollectionview的使用详解
三个代理<UICollectionViewDataSource,UICollectionViewDelegate,UICollectionViewDelegateFlowLayout> 前两个的用法和tableView的很像,第三个是布局的协议。(注意:头视图尾视图都是由代理方法获得,而且需要写注册,缺少了也不行。) 注册以后,就不需要再去管理复用的问题了。这点就很简单。这个如果用好的话,会非常的简单。
UICollectionView的布局
UICollectionView的布局
343 0
UICollectionView的布局
|
iOS开发
iOS UITableViewCell嵌套CollectionView,tableview和collectionview同时滑动bug修复
iOS UITableViewCell嵌套CollectionView,tableview和collectionview同时滑动bug修复
922 0