Skip to content

Instantly share code, notes, and snippets.

@ytlvy
Created November 13, 2015 10:33
Show Gist options
  • Save ytlvy/fe6dcfe53367546d1a8f to your computer and use it in GitHub Desktop.
Save ytlvy/fe6dcfe53367546d1a8f to your computer and use it in GitHub Desktop.
iOS 8 workaround for no inset in UITableViewCell separator
// No separator insets
self.separatorInset = UIEdgeInsetsZero;
if ([self respondsToSelector:@selector(layoutMargins)]) {
self.layoutMargins = UIEdgeInsetsZero;
}
// No separator insets
self.tableView.separatorInset = UIEdgeInsetsZero;
if ([self.tableView respondsToSelector:@selector(layoutMargins)]) {
self.tableView.layoutMargins = UIEdgeInsetsZero;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment