Skip to content

Instantly share code, notes, and snippets.

@andyyhope
Created April 2, 2015 04:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andyyhope/7827a401eeb850e00f53 to your computer and use it in GitHub Desktop.
Save andyyhope/7827a401eeb850e00f53 to your computer and use it in GitHub Desktop.
UIEdgeInsets separatorInset = UIEdgeInsetsMake(0, 0, 0, 0);
// Remove seperator inset
if ([self respondsToSelector:@selector(setSeparatorInset:)]) {
[self setSeparatorInset:separatorInset];
}
// Prevent the cell from inheriting the Table View's margin settings
if ([self respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) {
[self setPreservesSuperviewLayoutMargins:NO];
}
// Explictly set your cell's layout margins
if ([self respondsToSelector:@selector(setLayoutMargins:)]) {
[self setLayoutMargins:separatorInset];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment