LAD
LAD

Reputation: 135

Swift navigation controller - Hide view

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.

Upvotes: 0

Views: 139

Answers (2)

Dharma
Dharma

Reputation: 3013

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

self.edgesForExtendedLayout = []

Upvotes: 3

karthikeyan
karthikeyan

Reputation: 3888

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

Image

Upvotes: 0

Related Questions