Matt W
Matt W

Reputation: 33

Navigation controller causing auto-layout issues on screens in Xcode 8

This has happened on a couple of apps I've been working on, and I believe it has something to do with Navigation bars or Tab bars. I'll work on another screen and be messing with the code and then I'll randomly scroll across the Storyboard and see that all the constraints have suddenly changed values and some items have expanded to 1000 x 1000.

Has anyone experienced this before, and know what is causing it? It's happened quite a few times to me now and it's obviously annoying to reset them each time.

Storyboard Image

Upvotes: 3

Views: 218

Answers (1)

pedrouan
pedrouan

Reputation: 12910

Since you updated your Xcode to 8, you may need to update frames in the whole scene (once).

If you do that each time and it doesn't help, for me changing size of the storyboard helped. For example change from iPhone SE to iPhone 6 and vice-versa.

Now in Xcode 8.1 Beta version, there is a shortcut button for this.

Just select the problematic view's superview (containing mentioned constraints), and click this update frames button:

enter image description here

Upvotes: 1

Related Questions