-5

These days I'm doing an iOS application with swift. The problem is that I anchored everything with the height and length of the screen, so it comes out different. I would like to have the black bands above and below so, as to return to 16:9.

enter image description here

enter image description here

enter image description here

Eric Aya
  • 69,473
  • 35
  • 181
  • 253

3 Answers3

0

Delete your constraints on your view. Then add them back making sure you are pinning the top and bottom to the Safe Area like so (red view for emphasis):

enter image description here

Martin Muldoon
  • 3,388
  • 4
  • 24
  • 55
0

For apps with custom layouts, supporting iPhone X should also be relatively easy, especially if your app uses Auto Layout and adheres to Safe Area and margin layout guides.

A.Munzer
  • 1,890
  • 1
  • 16
  • 27
0

a Working solution from my current App

when I dont make use of kaunchScreen.storyboard

output: enter image description here

As you are having black area in iPhone X Same is here

Solution

enter image description here

Output after solution

Black area is removed

enter image description here

Hope it Helps

iOS Geek
  • 4,825
  • 1
  • 9
  • 30
  • do your splash screen Designed in Launch screen Storyboard appears correctly in iPhone X? or that is also created programmatically and you haven't designed Splash using launch SCreen storyBoard – iOS Geek Apr 27 '18 at 04:10