Safe area position

Hi all,


I'm new to iOS app developing. In my sub-view, There is a vertical gap between view's top boundary and safe area's top boundary like this. I just added new view to a view controller in story board. So I have no idea to clear this gap.

I'm sory for small amount of information about my work. What information is needed for understanding my codition? Or How should I do to remove the galp?

Your picture does not show enough to be sure.

Could be:

- either constraints are wrong: show them


- Or, the gap comes from the way you present the view.

In storyboard, select the viewController.

Open Attributes Inspector

In Presentation field, select Full Screen (instead of Automatic).

Thnak you for advising me. I just added one view so There isn't any constraiont as shown in this image. But I have an additional information of my issue. This view is embedded in an parent view. In this parent view, The height of embedded view is specified as show in this image. However, I guess this doesn't relate to my issue.


Also, I tried to set "Full Screen" to the value of Presentation property of the view controller. But This didn't work for me.

Also, I tried to set "Full Screen"


=> Apparently, you did it on the wrong viewController.


You should do it on ViewController, not Status ViewController.

Hi, I selected "View Controller" and change the Presentation property from "Automatic" to "Full Screen" as you had said like this. However, The safe area still in the wrong position.

Trying to debug just through some images, without checking the complete set up is very difficult.


Could you post a sample project (complete, not just some files) and compressed somewhere ?

Did you set to fullScreen for both views ?


What is the type of segue between the 2 ? Click on segue and open Attributes inspector

- if it is Present Modally, check what is presentation for segue (that seems to be your case, looking at the icon on segue):

If it is "Same as Destination", replace also by "Full Screen"

- If it is Push, then setting the Presentation for both View Controllers should be enough.

Hi, I'm sorry for late response. I upload the simple project to reproduce my problem to the following location. You can check the position of the safe area by this steps.


https://drive.google.com/open?id=1OUYMxcmBINAeSDfZe2FlkiEcyIoJN6lF


Also, I cannot understand what you mean in the latest post.

Hi, while I do not see the image that you posted, I was able to look at your project. When previewing the storyboard on iPhone 11, I see an "Upper Controls View" sitting right at the top of the safe area and below the status bar. The safe area represents the un-occluded area for that scene. Did you want that view to also go flush against the top screen edge? If so, you should switch the top constraint "wbK-lu-7zp" to be between "Upper Controls View".top and its superview.top, with a constant of 0. Does that help achieve the layout that you want?
Safe area position
 
 
Q