UITableViewCell Indented in UITableView

Viewed 10

UITableViewCell indents itself even though I have set,

tableView.translatesAutoresizingMaskIntoConstraints = false
tableView.layoutMargins = UIEdgeInsets.zero
tableView.contentInset = UIEdgeInsets.zero
1 Answers

My viewcontroller autorotates from vertical to horizontal so the safe area is automatically applied so you need to set,

tableView.insetsContentViewsToSafeArea = false.

Hope this saves you some time.

Related