0

Create the tableView in the storyboard, and set the constraints to arrive the all around. But when running on simulator, there appear some space form the top to the first cell.

The issue on simulator:

on the simulator

The Debug View Hierarchy:

Debug View Hierarchy

And in the storyboard i set the constraints :

constraints

aircraft
  • 25,146
  • 28
  • 91
  • 166

4 Answers4

3

In the attribute inspector of your view controller try to disable Adjust Scroll View Inset, see below image

enter image description here

Rajat
  • 10,977
  • 3
  • 38
  • 55
1

if your navigation bar is translucent then you can unselect the adjust scroll view insets for your view controller in storyboard

Er. Khatri
  • 1,384
  • 11
  • 29
0

I think you should check your constraints

enter image description here

Quang Dam
  • 305
  • 3
  • 15
0

In the attribute inspector of your view controller try to disable Extended Edges->underTopBar

enter image description here

Annie Gupta
  • 2,786
  • 15
  • 23
  • Please check if the tableview is grouped/plain in Attributes Inspector. In my case I have changed the style to plain and it worked. Now the extra spacing above the header has disappeared. – vinny Nov 18 '19 at 08:05