Reputation: 11
Starting in iOS 9.3.2, there is extra space at the top and bottom.
Here are some examples:
There is about 20 pixels of unexplained padding. Can anyone explain where do they come from?
self.automaticallyAdjustsScrollViewInsets = NO;
This doesn't work for me.
Upvotes: 1
Views: 2257
Reputation:
You can do this by using contentInset
property for UITableView
self.tableView.contentInset = UIEdgeInsetsMake(-20, 0, -20, 0);
This will remove the extra spaces from top and bottom
Upvotes: 4
Reputation: 5049
1.Check if your table view in touching the edges of viewcontroller.
2.If not then make it touch each side of th view controller by expanding your tableview
3.Select your table view from Document outline and go to Pin menu of autolayout
4.Add 4 pin constraints and set the value to 0 as you can see in image below
5.Uncheck "Constraints to margins" and click add 4 constraints
Hope it will help.!
Upvotes: 0