Search code examples
iosiphone-x

iPhone X Topbar issue


I am trying to convert my app in iPhone X compatible. I have a table in my viewcontroller with top layout 20 pixel. Now below is the screenshot for both the devices

iPhone 8 iPhone 8

iPhone X iPhone-X

Now I am getting a white top bar with the coloured background in iPhone x.

In case if I am making a top layout for the table to 0, then cells overlaps topbar which I don't need.

Can anyone suggest what is the issue? Any suggestion would be great.


Solution

  • Change the background of the main view controller's view to your desired color:

    enter image description here enter image description here