UITableView have space at right side and bottom on viewController in IOS swift

380 Views Asked by At

I created viewController, then put TableView inside it. It look ok at storyboard. But after run, it have space at right side and bottom side. I already uncheck Adjust scroll view Insets at viewController. I also put code

self.tableView setContentInset:UIEdgeInsetsMake(108, 0, 0, 0)

But still can't solve the problem.

enter image description here

2

There are 2 best solutions below

0
On

Hello give constraint for table view :

enter image description here

0
On

Please check your viewcontroller's top bar is Translucent Navigation Bar or not and then set tableview constraint(leading, trailing, top and bottom) as set in given image.

enter image description here