博客> MCtableView
MCtableView
2019-12-11 09:00 评论:0 阅读:906 iOS_ming
ios MCtableView

MCtableView tableView = [MCtableView mcDefaultMCTableViewVC:self CGFrame:CGRectMake(0, 64, self.view.bounds.size.width, self.view.bounds.size.height - 64) TableViewStyle:UITableViewStyleGrouped]; NSArray pls = @[@"请输入01",@"请输入03",@"请输入03",@"请输入03"];
// tableView.mcDataSource(0,pls.count).mcDataSource(1,3); for (int i = 0; i < 2; i ++){ MCtCell cell = [[[NSBundle mainBundle]loadNibNamed:@"Order" owner:self options:nil]objectAtIndex:0]; cell.title.text = @"区头"; MCtCell cell1 = [[[NSBundle mainBundle]loadNibNamed:@"MCtableView" owner:self options:nil]objectAtIndex:2]; cell1.contentView.backgroundColor = [UIColor yellowColor]; cell1.title.text = @"就是这样"; tableView.mcHeader(i,80,YES,cell).mcFooter(i,60,YES,cell1); } tableView.mcRemoveFooter(1); [tableView.mcDataSource(0,pls.count).mcDataSource(1,10) mcReturnCellIndexPath:^(NSIndexPath indexPath, MCtCell cell){ NSLog(@"%ld,%ld",(long)indexPath.section,(long)indexPath.row); cell = [[[NSBundle mainBundle]loadNibNamed:@"MCtableView" owner:self options:nil]objectAtIndex:2]; if (indexPath.row < pls.count) { cell.title.text = pls[indexPath.row]; } tableView.mcSetShowCell(indexPath,cell); } SelendIndexPath:^(UIButton button,NSInteger mcTag,NSIndexPath indexPath,id data){ NSLog(@"%ld,%ld",indexPath.section,indexPath.row); }];

收藏
1
sina weixin mail 回到顶部