0

I have a problem with the navigation controller and the view. However, I have created a view with a constraint: "Top Space to: Top Layout Guide : 0". I get this result with the simulator:

layout in simulator

How to get the view correctly?

Thank you!

EDIT :

The problem is the top of the view is hidden by the navigation controller. On my screenshot, you can see that the segmented control is cut ! The top of the view is not show, even in the storyboard file.

2
  • check the properties under Top Bar in Storyboard for your viewController, maybe can help you Commented Jul 20, 2017 at 12:22
  • 1
    your screenshot is not showing anything, please describe your problem clearly. Commented Jul 20, 2017 at 12:22

2 Answers 2

3

Use edgesForExtendedLayout property to report which edges of your view controller extend underneath navigation bars or other system-provided views.

self.edgesForExtendedLayout = []
Sign up to request clarification or add additional context in comments.

Comments

0

Select your view controller from stoaryboard,then unselect the Adjust Scrollview Insets

Image

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.