Skip to content

Instantly share code, notes, and snippets.

@ezefranca
Last active August 29, 2015 14:16
Show Gist options
  • Save ezefranca/2b10a4a8087e67fa2b9f to your computer and use it in GitHub Desktop.
Save ezefranca/2b10a4a8087e67fa2b9f to your computer and use it in GitHub Desktop.
//full screen width table view separator
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath{
if ([tableView respondsToSelector:@selector(setSeparatorInset:)]) {
[tableView setSeparatorInset:UIEdgeInsetsZero];
}
if ([tableView respondsToSelector:@selector(setLayoutMargins:)]) {
[tableView setLayoutMargins:UIEdgeInsetsZero];
}
if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
[cell setLayoutMargins:UIEdgeInsetsZero];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment