Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove the top and bottom layout guides in interface builder

I'd like to do autolayout based on the parent view, but the top and bottom layout guides are fighting me. Thing is, I'm in an embedded view controller and they aren't relevant:

enter image description here

The layout guides are here:

enter image description here

I thought maybe one of these settings would remove them, but no luck:

enter image description here

How do I get rid of these guides? If that's not possible, any info on why they get created would be really helpful.

Thanks!

like image 930
SimplGy Avatar asked May 02 '16 17:05

SimplGy


People also ask

How do I remove top and bottom layout in Xcode?

I had to deselect and reselect Use Safe Area Layout Guides to remove the Top/Bottom layout guides and still keep safe area layout guides.

How do I remove content layout guide?

Simply uncheck the Content Layout Guides. This option is found under the Size Inspector tab in storyboard. NOTE: This option is found under the Size Inspector tab in storyboard.

How do I disable safe area layout guide?

You can disable safe area layout guide from storyboard for particular view controller. Select View Controller -> File Inspector (first tab) -> Use safe area layout guides (uncheck the checkbox). You can also change it programmatically in viewDidLoad(). Hope this Helps!

How do you add top and bottom layout in storyboard?

Select your view. Select 'Add New Constraints' option in the InterfaceBuilder. From the dropdown menu of top or bottom constraint, select the 'Top Layout Guide' or 'Bottom Layout Guide'.


2 Answers

Remove the top and bottom layout guides pic

enter image description here

like image 122
Juan Avatar answered Sep 24 '22 14:09

Juan


Simply to deselect and reselect Use Safe Area Layout Guides, as Apple deprecated Top Layout Guide

@Daniel Storm's answer is more accurate.

@Juan's answer is good , not very ok.

1 3

2

like image 23
black_pearl Avatar answered Sep 24 '22 14:09

black_pearl