Skip to content

Instantly share code, notes, and snippets.

@adriantofan
Last active April 6, 2016 07:32
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 adriantofan/353e92b98cd43c05953b to your computer and use it in GitHub Desktop.
Save adriantofan/353e92b98cd43c05953b to your computer and use it in GitHub Desktop.
no separators for empty cells
tableView.tableFooterView = UIView(frame: CGRectZero)
//http://stackoverflow.com/questions/25770119/ios-8-uitableview-separator-inset-0-not-working
// From End To end
cell.separatorInset = UIEdgeInsetsZero;
cell.layoutMargins = UIEdgeInsetsZero;
cell.preservesSuperviewLayoutMargins = NO;
// invisible
cell.separatorInset = UIEdgeInsetsMake(0, CGRectGetWidth(self.view.bounds)/2.0, 0, CGRectGetWidth(self.view.bounds)/2.0);
// normal indent
cell.separatorInset = UIEdgeInsetsMake(0, 60, 0, 0); // indent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment