代码库> 列表> 高效开发 tableView collectionView 快速布局
高效开发 tableView collectionView 快速布局
关注
上传者:iOS_ming 分类:列表(Tableview Collection)
查看次数:2765 下载次数:620
上传时间:2017-10-15 大小:1 KB
高效开发 tableView collectionView 快速布局:
-(void)layoutView{
[self.myCollection.mcSections(1).mcIdentifierCells(@[@{@"Scroll":@"Scroll"}]) mcLayoutReturnItmeIndexPath:^(NSIndexPath *indexPath, MCLayoutDataSource *mcLayout) {
mcLayout.mcRows(3).mcItmeName(@"Scroll").mcSizeItem(CGSizeMake(WIDTH_SCREEN, HEIGHT_SCREEN));
} setReturnCell:^(NSIndexPath *indexPath, MCLayoutCell *itme) {
ShowImg *cell = (ShowImg *)itme;
if (indexPath.row == 2) {
cell.button.hidden = YES;
}else{
cell.button.hidden = NO;
}
cell.showImg.image = [UIImage imageNamed:[NSString stringWithFormat:@"scroll%ld",(long)indexPath.row +1]];
}];

}
-(void)selendView{
[self.myCollection mcReturnSelendItmeIndexPath:^(NSIndexPath *indexPath, NSInteger tag, id data) {
if (tag == 10) {
if (indexPath.row != 2) {
[UserInfo insertUserDefault:@"1234" Key:@"Scroll"];
[self presentViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"Home"] animated:NO completion:nil];
}
}else if(tag == 11){
if (indexPath.row == 2){
[UserInfo insertUserDefault:@"1234" Key:@"Scroll"];
[self presentViewController:[self.storyboard instantiateViewControllerWithIdentifier:@"Home"] animated:NO completion:nil];
}
}
}];
}
注:最好把我打包的附的截图看一遍 你就会用collectionView了
收藏
我来说两句
发表评论
您还没有登录!请登录注册
所有评论(0


综合评论
提示
sina weixin mail 回到顶部