Apologies if this comes across as a beginner's question. I'm trying to populate a UITableView with sections and custom cell formatting.
i've debug this code and the label on each tag returns the correct value:
-(UITableViewCell *)cellForIndexPath:(NSIndexPath *)indexPath forData:(NSObject *)cellData {
static NSString *CellIdentifier = @"MatterWIPCell";
RVMatterWIPExceptionSummary *matterWIPSummary = (RVMatterWIPExceptionSummary *)cellData;
UITableViewCell *cell = [self.searchableTable dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
}
UILabel *label;
label = (UILabel *)[cell viewWithTag:1];
label.text = [[DataFormat dataFormat] stringLabelFormat: matterWIPSummary.fileNumber];
label = (UILabel *)[cell viewWithTag:2];
label.text = [[DataFormat dataFormat] stringLabelFormat: matterWIPSummary.clientName];
label = (UILabel *)[cell viewWithTag:3];
label.text = [[DataFormat dataFormat] stringLabelFormat: matterWIPSummary.matterTitle];
label = (UILabel *)[cell viewWithTag:4];
label.text = [[DataFormat dataFormat] currencyFormat:matterWIPSummary.workInProgress withDecimals:YES];
label = (UILabel *)[cell viewWithTag:5];
label.text = [[DataFormat dataFormat] stringLabelFormat:matterWIPSummary.matterDescription];
[cell setSelectionStyle:UITableViewCellSelectionStyleNone];
return cell;
}
i have checked the storyboard it uses the same cell identifier.
Did i miss something so the data won't display even the cell never returns nil?
Thank You