1

I want to make a padding for tableView's content. The result should be the following:

Result I want to achieve

If I use tableView.contentInset = UIEdgeInset(...) like this:

func setStandartDesign() {
  ...
    tableView.contentInsetAdjustmentBehavior = .always
    tableView.showsVerticalScrollIndicator = false
    tableView.contentInset = UIEdgeInsets(top: 0, left: .bigOffset, bottom: 0, right: .bigOffset)
   ...
}

To be clear .bigOffset is merely a constant value that is equal to 12

And then use it in viewDidLoad:

override func viewDidLoad() {
    setStandartDesign()
}

I have insets only on the left side of a tableView: No inset on the right side

Alternatively I can use .insetGrouped style of the tableView. However, I do not know how to change a padding size. Is there any possible way to fix this problem?

0 Answers0