Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting a white space at bottom of iPhone X screen (Xcode 9)

Tags:

ios

iphone-x

I'm using Xcode 9 for my project and I'm getting a white space at the bottom, here is the screenshot:

enter image description here

Also I'm using storyboard to design with 4 inches (iphone 5s/SE) as layout.

How to avoid the white space?

like image 439
Harish Avatar asked Sep 20 '17 12:09

Harish


1 Answers

Your bottom constraints should be from view not from the bottom layout guide or safe area(xcode 9 specific) and your distance should be zero.

Default it was pinned with layout guides, so give it with view !

Refer below screenshot for better understanding,

enter image description here

to open this dialogue, click drop down icon of field contains 0!

You can do same for top constraint also!

Update :

Second main important thing,

you should use storyboard for your launch or splashscreen. If you are using launch image then replace it by new launch image of xcode 9 and it have option for the image of iphone x.

Then you will not found white space any more!

Refer below screenshot.

enter image description here

like image 56
Ketan Parmar Avatar answered Sep 22 '22 21:09

Ketan Parmar