I have an app where the UITableView\'s separator inset is set to custom values - Right 0, Left 0. This works perfectly in iOS 7.
Simple solution in Swift for iOS 8 with a custom UITableViewCell
override func awakeFromNib() {
super.awakeFromNib()
self.layoutMargins = UIEdgeInsetsZero
self.separatorInset = UIEdgeInsetsZero
}
In this way you are setting layoutMargin and separatorInset just one time instead of doing it for each willDisplayCell as most of the above answers suggest.
If you are using a custom UITableViewCell this is the correct place to do it.
Otherwise you should do it in tableView:cellForRowAtIndexPath.
Just another hint: you don't need to set preservesSuperviewLayoutMargins = false because default value is already NO!