Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Separator line showing up after selection of last row in section

I'm seeing a weird behavior in all of my UITableView's. This is starting to drive me nuts.

I have plain styled UITableViews. The last row in the section doesn't get a separator, it just blends in to the section header (default usage by the way). Checking the height of this last row, it appears Apple is making it 1px larger to remove the separator height from the cell. The problem is when I select the row, but drag off, the separator line shows up and never goes away. If I go back a view and come back in, it defaults to off.

I'm seeing this across all of my table views, normal cells and custom cells. What can I do to make sure this last separator stays away when I cancel a selection? iOS 7 only build. Running current builds, no betas.

like image 998
Bill Burgess Avatar asked Jan 20 '14 16:01

Bill Burgess


1 Answers

For me reloading of cell helped for some separator line problems:

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
    [tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
}

- (void)tableView:(UITableView *)tableView didUnhighlightRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
}
like image 144
Grzegorz Krukowski Avatar answered Nov 15 '22 23:11

Grzegorz Krukowski