I have a TableView
that i populate with custom cells. In this code i would like to set the data on my different labels, but it doesnt seem to work. I can not add any outlets, not sure why i cant do that. When i try to change the data with cell.textLabel.text = @"Data";
it seems to add a new label instead of changing the text of the current one.
What should i do? Code below shows how i populate the list.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
SenasteTableCell *cell = [tableView dequeueReusableHeaderFooterViewWithIdentifier:CellIdentifier];
if(cell == nil)
{
NSArray* views = [[NSBundle mainBundle] loadNibNamed:@"SenasteTableCell" owner:nil options:nil];
for (UIView *view in views)
{
cell = (SenasteTableCell*)view;
}
}
return cell;
}