iOS 8 UITableView: separator inset not working, how to fix?
Hi everyone! I'm new to iOS development and encountered a problem when configuring separator insets for UITableView rows on iOS 8. I'm writing in Swift, and I can't get the separator inset to zero out. Here's my code:
```swift
tableView.separatorInset = .zero
tableView.layoutMargins = .zero
```
I tried setting these properties both in viewDidLoad and viewWillAppear, but the separators still have a left inset (about 15 pixels). This looks ugly, especially when I want the line to go from edge to edge of the cell.
I also tried overriding the layoutMargins method in the cell:
```swift
override func layoutMargins() {
super.layoutMargins()
self.layoutMargins = .zero
}
```
But this doesn't help. What could be the issue? Why is it not working on iOS 8?
No answers yet.
Log in to leave an answer