I have weird problem, because I can't fill whole area of super view using layout anchor
this is my code from custom UIView class:
private func setupTableView() {
addSubview(tableView)
tableView.translatesAutoresizingMaskIntoConstraints = false
let margins = layoutMarginsGuide
let trailingAnchor = tableView.trailingAnchor.constraint(equalTo: margins.trailingAnchor)
let leadingAnchor = tableView.leadingAnchor.constraint(equalTo: margins.leadingAnchor)
let topAnchor = tableView.topAnchor.constraint(equalTo: margins.topAnchor)
let bottomAnchor = tableView.bottomAnchor.constraint(equalTo: margins.bottomAnchor)
NSLayoutConstraint.activate([trailingAnchor, leadingAnchor, topAnchor, bottomAnchor])
}
and in result I get weird margins on the left and right site: