UICollectionView:
来源:互联网 发布:mac硬盘格式化方案 编辑:程序博客网 时间:2024/05/16 00:34
UICollectionView:
-(id)initWithCoder:(NSCoder *)aDecoder{
if(self =[super initWithCoder:aDecoder]){
return [self init];
}
return self;
}
-(NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{
return self.products.count;
}
-(UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
LJProductCollectionViewCell *cell=[collectionView dequeueReusableCellWithReuseIdentifier:identifier forIndexPath:indexPath];
cell.productItem=self.products[indexPath.row];
return cell;
}
-(void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath{
LJProductBaseViewController *productDetailVC=[[LJProductBaseViewController alloc]init];
[self.navigationController pushViewController:productDetailVC animated:YES];
}
- (UICollectionViewFlowLayout *) flowLayout{
UICollectionViewFlowLayout *flowLayout = [[UICollectionViewFlowLayout alloc] init];
flowLayout.headerReferenceSize = CGSizeMake(300.0f, 50.0f); //设置head大小
return flowLayout;
}
- UICollectionView
- UICollectionView
- UICollectionView
- UICollectionView
- UICollectionView
- UICollectionView
- UICollectionView
- UICollectionView
- UICollectionView
- UICollectionView
- UICollectionView
- UICollectionView
- UICollectionView
- UICollectionView
- UICollectionView
- UICollectionView
- UICollectionView
- UICollectionView
- SQL小结(四)
- SQL小结(四)
- copy strong assign weak retain 的用法
- 写一个函数找出一个整数数组中,第二大的数
- 快速安装cocoaPods的教程,利用cocoaPods对IOS程序进行依赖管理
- UICollectionView:
- 常用的比较陌生的控件属性
- ScreenWidth [UIScreen mainScreen].bounds.size.width
- 关于收缩隐藏的问题
- 创建tableviewcell
- 控制器与cell之间传数据
- 如何给火狐浏览器新建一个新的用户配置文件
- Android XListView实现原理讲解及分析
- IOS开发常见命名规范: