Created
September 30, 2014 12:03
-
-
Save maail/2558084f7aa43c99796a to your computer and use it in GitHub Desktop.
Set UITableViews Separator Insets to Zero in iOS8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) { | |
if(self.tableView.respondsToSelector(Selector("setSeparatorInset:"))){ | |
self.tableView.separatorInset = UIEdgeInsetsZero | |
} | |
if(self.tableView.respondsToSelector(Selector("setLayoutMargins:"))){ | |
self.tableView.layoutMargins = UIEdgeInsetsZero | |
} | |
if(cell.respondsToSelector(Selector("setLayoutMargins:"))){ | |
cell.layoutMargins = UIEdgeInsetsZero | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment