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
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.!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.