自定义表格视图单元格显示为空白(标签为零)

时间:2014-07-23 18:53:21

标签: ios objective-c ios7

我使用与我的应用中其他表格相同的代码,但我在这里遗漏了一些东西。我没有设置任何标签,如图所示。

nil UILabels

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{


    CommissionsCell *cell = [tableView dequeueReusableCellWithIdentifier:@"CommissionsCell"];
    CommissionInfo* tmpInfo = [g_commissionList objectAtIndex:[indexPath row]];

    cell.backgroundColor=[UIColor colorWithWhite:0.95 alpha:1 ];

    cell.lblDescription.text = tmpInfo.description;
    cell.lblDate.text = tmpInfo.date;
    cell.lblStatus.text = tmpInfo.status;

    if([tmpInfo.imgThumbPath isEqualToString:@""]){
        cell.lblInstructions.hidden=NO;
    }else{
        cell.lblInstructions.hidden=YES;
    }


    [cell.btnImg setImage:tmpInfo.img_thumb];
    return cell;
}

我在CommissionsCell.h文件中映射了我的所有标签,知道造成这种情况的原因是什么?

Cell setup

0 个答案:

没有答案
相关问题