【文件属性】:
文件名称:ios-高效开发 tableView collectionView 快速布局.zip
文件大小:1.2MB
文件格式:ZIP
更新时间:2022-07-31 13:02:20
列表
高效开发 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了
【文件预览】:
4.MCTableViewCell.m.png
5.MCTableViewCellXib.png
3.MCTableViewCell.h.png
MClistView.framework
----MCollectionView.nib(1KB)
----Info.plist(723B)
----Modules()
--------module.modulemap(101B)
----MClistView(834KB)
----MCTableView.nib(1KB)
----Headers()
--------MClistView.h(526B)
--------MCStateView.h(19KB)
6.png
2.MCTableView点击事件.png
1.MCTableView布局.png