Cell 赋值

2017-06-29  本文已影响0人  eb7a9dac29d0

/*

if (indexPath.row == 0) {

MTPlanWeekCell * cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier forIndexPath:indexPath];

for (MTPlanDataModel *dataArray in self.PlanModel.data){

if ([dataArray.type isEqualToString:@"3"]) {

cell.combinedModel = dataArray;

}

}

if (cell == nil) {

cell = [[MTPlanWeekCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier];

}

return cell;

}

if (indexPath.row == 1) {

MTPlanRTCell * cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier2 forIndexPath:indexPath];

for (MTPlanDataModel *dataArray in self.PlanModel.data){

if ([dataArray.type isEqualToString:@"2"]) {

cell.RTModel = dataArray;

}

}

if (cell == nil) {

cell = [[MTPlanRTCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier2];

}

return cell;

}

if (indexPath.row == 3) {

MTPlanAECell * cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier3 forIndexPath:indexPath];

for (MTPlanDataModel *dataArray in self.PlanModel.data){

if ([dataArray.type isEqualToString:@"1"]) {

cell.AEModel = dataArray;

}

}

if (cell == nil) {

cell = [[MTPlanAECell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier3];

}

return cell;

}

if (indexPath.row == 4) {

MTPlanRestCell * cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier4 forIndexPath:indexPath];

for (MTPlanDataModel *dataArray in self.PlanModel.data){

if ([dataArray.type isEqualToString:@"5"]) {

cell.RestModel = dataArray;

}

}

if (cell == nil) {

cell = [[MTPlanRestCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier4];

}

return cell;

}

if (indexPath.row == 5) {

MTPlanRestCell * cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier4 forIndexPath:indexPath];

for (MTPlanDataModel *dataArray in self.PlanModel.data){

if ([dataArray.type isEqualToString:@"5"]) {

cell.RestModel = dataArray;

}

}

if (cell == nil) {

cell = [[MTPlanRestCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier4];

}

return cell;

}

if (indexPath.row == 6) {

MTPlanRestCell * cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier4 forIndexPath:indexPath];

for (MTPlanDataModel *dataArray in self.PlanModel.data){

if ([dataArray.type isEqualToString:@"5"]) {

cell.RestModel = dataArray;

}

}

if (cell == nil) {

cell = [[MTPlanRestCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier4];

}

return cell;

}

MTPlanRTCell * cell = [tableView dequeueReusableCellWithIdentifier:reuseIdentifier2 forIndexPath:indexPath];

if (cell == nil) {

cell = [[MTPlanRTCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:reuseIdentifier2];

}

return cell;

*/

上一篇下一篇

猜你喜欢

热点阅读