Does anyone know why a UITableView inside a UIViewController always has a gap above the UITableViewCell. I'm aware that this is expected for Grouped cells, but this is a Plain cell.
How can I remove the gap?


Does anyone know why a UITableView inside a UIViewController always has a gap above the UITableViewCell. I'm aware that this is expected for Grouped cells, but this is a Plain cell.
How can I remove the gap?


[[self UITableView] setContentInset:UIEdgeInsetsMake(-65, 0, 0, 0)];
That did the trick for me.
One of the proposed answers to the quesion UITableView is getting a gap on top solved this for me, although it's not the approved answer.
Just add this code in ViewDidLoad
self.automaticallyAdjustsScrollViewInsets = NO;
Alternatively, you can set this property on the ViewController in the storyboard.