Collin
Collin

Reputation: 6760

UITableView Separator Inset Reference not working in storyboard

I want to inset the table view separator by 10 points from the current automatic inset so it respects the safe area etc. but when I set it in the storyboard it doesn't work as documented.

Storyboard Separator Inset Settings and Reference

Separator Inset Not Reflecting the Automatic Inset

Upvotes: 1

Views: 473

Answers (1)

Collin
Collin

Reputation: 6760

Turns out the settings in the storyboard are not being respected.

When I added the settings in code then it worked as expected.

tableView.separatorInsetReference = .fromAutomaticInsets
tableView.separatorInset = .init(top: 0, left: 10, bottom: 0, right: 0)

Separator Inset Reference

Upvotes: 1

Related Questions