Chase Roberts
Chase Roberts

Reputation: 9376

Xcode 11 how to disable Auto Layout?

In previous versions of Xcode, I was able to just open the storyboard and click almost anywhere, and in the file inspector, there was a button to disable auto layout. It seems like that's not an option anymore? Am I being forced to use auto layout now?

screenshot of storyboard file inpsector with no autolayout option

Upvotes: 6

Views: 4313

Answers (3)

Eugene Pinchuk
Eugene Pinchuk

Reputation: 576

Select your view in the storyboard and enable/disable LAYOUT automatic option in the right section

xcode11

Upvotes: 1

Tom
Tom

Reputation: 1546

According Apple forum this option silently disappeared in Xcode 11.

You can still do it programmatically at viewDidLoad

for constraint in self.view.constraints {  
    constraint.isActive = false  
}

Upvotes: 6

user14290104
user14290104

Reputation: 1

In Interface Builder, highlight the constraint(s) on the left side and uncheck "Installed" in the Attributes Inspector

Upvotes: 0

Related Questions