I\'m trying to position a TableView inside my ViewController view but leaving a 44 height gap between the bottom of the navigation bar and the top of the table. I then wante
Just add this in you ViewDidLoad method
self.automaticallyAdjustsScrollViewInsets = NO;
You should not need to change the default setting for Extend Edges.
Looks like the real problem is a blank table header view in your storyboard. It's showing in the screenshot you provided of your storyboard, right below the Enter Name view and right above the Prototype Cells view. Delete it.
For Objective-C folks, add this in your ViewDidLoad method.
[self.tableView setContentInset:UIEdgeInsetsMake(-20, 0, 0, 0)];
My issues is, I set tableHeaderView
as new UIView
like this
self.tableHeaderView = UIView(frame: .zero)
Remove this line, the issue is gone. Try this:
//self.tableHeaderView = UIView(frame: .zero)
Try this one:
self.tableView.contentInset = UIEdgeInsetsMake(-65, 0, 0, 0)
change your table view style from grouped to plain