Click cell detailLabelText will disapear
I create Item below: RETableViewItem *testItem = [[RETableViewItem alloc] initWithTitle:@"test" accessoryType:UITableViewCellAccessoryNone selectionHandler:^(RETableViewItem *item) { [item reloadRowWithAnimation:UITableViewRowAnimationAutomatic]; }]; testItem.detailLabelText = @"test"; testItem.selectionStyle = UITableViewCellSelectionStyleNone; testItem.style = UITableViewCellStyleValue1; [section addItem:testItem];
When click on cell, detailLabelText will disappear. Then click again, detailLabelText will appear.
Please forgive my ignorance, but what's the issue?
DetailLabelText should be display. But now, when I click on cell, detailLabelText will disappear.
Error in commit https://github.com/romaonthego/RETableViewManager/commit/3cdf6c02fa98c6021f59923dc22dc5b4a2cb2611
if (cell == nil) {
cell = [[cellClass alloc] initWithStyle:cellStyle reuseIdentifier:cellIdentifier];
[self.tableView registerClass:cellClass forCellReuseIdentifier:cellIdentifier];
loadCell(cell);
}
registerClass don't save style!!
Fix — remove useless optimization in RETableViewManager.m: 217 [self.tableView registerClass:cellClass forCellReuseIdentifier:cellIdentifier];
@fanruten Thanks,it seems OK.
Another solution is to set the cellIdentifier on each item: firstNameItem!.cellIdentifier = "LastNameCell". This would mean only the one cell would exist at any time for each use. The issue is that when UITableView creates new cells for reuse identifiers it doesn't use the same style, so registering them for reuse is pointless. Using nibs would also be a solution, as that allows for changing the cell style.