我使用与我的应用中其他表格相同的代码,但我在这里遗漏了一些东西。我没有设置任何标签,如图所示。
- (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文件中映射了我的所有标签,知道造成这种情况的原因是什么?