0

Below is the output of my application when displayed on an iPhone X, it works perfect with all other iPhone, since they are not full screen with rounded edges.

enter image description here

as you can see the top portion where the time and battery icons are located is not fully filled in?

I am not sure how I can fix this. Should it be in the code or can I do it in the storyboard, I have tried in the storyboard but I have not been successful yet. Does anyone have any idea and/or tips of what I need to adjust in the storyboard to get it fo fill the full screen.

Please note this has the stretchy header, like twitter profile effect, which I still wish to retain.

JimHawkins
  • 4,843
  • 8
  • 35
  • 55
iosforme
  • 25
  • 1
  • 10

1 Answers1

1

EDIT

This question may have the answer you are looking for if you wish to extend your view underneath the status bar on an iPhone X.

Original answer

Is the constraint to the top of your view a hard coded value? You should be using the safe areas to attach auto layout constraints so that your app will layout correctly on the iPhone X.

StatusBarInferredHeight

More information on laying out your ViewControllers for the iPhone X can be found here

Rhuari Glen
  • 497
  • 2
  • 5
  • Hello Rhuari. Thanks for the suggestion, but I dont want a safe area for this portion, I actually want the image to go all the way to the edge. There are many apps that do so on the iPhone X. Using safe area will not display the image in that space as I would like. – iosforme Jul 04 '18 at 21:10
  • @iosforme I have updated my answer with a link to a question that may help! – Rhuari Glen Jul 04 '18 at 21:29