一个tableView的自定义cell
在users数组里第3项有可能是空,加判断
BBLSTwoLabelCell *cell = [tableView dequeueReusableCellWithIdentifier:cidTrainnerTwoLabelCell forIndexPath:indexPath];
NSArray *users = _infoModel.club_course_list;
if (users.count != 4) {
return cell;
} else {
ApiTrainlistArrayModel *userModel = [users objectAtIndex:3];
NSString *str = @"成人班: ";
NSString *str2 = userModel.club_cour_name;
NSString *str3 = [NSString stringWithFormat:@"%@%@", str, str2];
cell.timeLabel.text = str3;
NSString *str4 = userModel.club_cour_price;
NSString *str5 = @"元";
cell.moneyLabel.text = [NSString stringWithFormat:@"%@%@", str4, str5];
return cell;
}