Skip to content

Instantly share code, notes, and snippets.

@PadraigK
Created January 17, 2014 20:53
Show Gist options
  • Save PadraigK/8481266 to your computer and use it in GitHub Desktop.
Save PadraigK/8481266 to your computer and use it in GitHub Desktop.
Your nightmare of double borders at the bottom of table views after selecting a cell is now over.
- (void)tableView:(UITableView *)tableView didUnhighlightRowAtIndexPath:(NSIndexPath *)indexPath
{
// Fix double cell border after highlight
if (indexPath.row == self.fetchedResultsController.fetchedObjects.count-1) {
UITableViewCell * cell = [self.tableView cellForRowAtIndexPath:indexPath];
UIView *tableScrollView = [[cell subviews] lastObject];
UIView *separator = [[tableScrollView subviews] lastObject];
[separator setBackgroundColor:[UIColor clearColor]];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment