美文网首页
Cell 赋值

Cell 赋值

作者: eb7a9dac29d0 | 来源:发表于2017-06-29 18:12 被阅读0次

    /*

    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;

    */

    相关文章

      网友评论

          本文标题:Cell 赋值

          本文链接:https://www.haomeiwen.com/subject/vskvcxtx.html