33

enter image description here

I currently updated to Xcode 8 GM. When I try to see my storyboard, above window pops up and there's no way to avoid this settings. I chose 6s screen and all my view controllers changed to 6s size. It will be much harder to adjust layout constraints on that small screens. I believe it's possible to change the size to iPad but I want to know what this is first.

No way to comeback to ambiguous sized view controllers?

What is this settings for?

Vincent Gigandet
  • 918
  • 10
  • 21
  • Same here, my storyboards changed to iPhone 6s and all of my autolayout constraints are messed up, 36 constraint warnings, why? @ Vincent Gigandet - Did you get any constraint warnings when you selected the iPhone 6s as the device view? – fs_tigre Sep 10 '16 at 02:07
  • @fs_tigre - Me too but not that many. I found two buttons are missing which freaks me out so I came back to xcode 7. I will not use xcode 8 until I find a clear solution. – Vincent Gigandet Sep 10 '16 at 02:58
  • 4
    I have been playing around with with XCode 8 and it looks like this is the new way to work with auto layout in XCode 8, the wAny-hAny option it's gone. I think this is actually an improvement since now it is faster to change to different devices. There is no way to avoid the pop-up box you are talking about. – fs_tigre Sep 12 '16 at 17:48
  • 4
    I have many xib files, it seems like I have to choose device and adjust auto layout constraint for every file. I am going to be crazy! – Michael Sep 14 '16 at 07:17
  • @huuang - I am using xib's as well. Have you found a good solution for this issue? If I choose the iPhone SE and then run my app on an iPhone 6, I don't see any warnings, but my views are all sized down as if I were running an SE simulator inside my iPhone 6... – BrianS Oct 05 '16 at 19:59

4 Answers4

17

A way "come back to ambiguous sized" can be:

Select all the Scenes(View Controllers) in the Storyboard, show the Size inspector, change the Simulated Size to Freeform, then set Width Height = 600.

Then, those tons of warnings disappear.

enter image description here

Xiang LI
  • 345
  • 1
  • 9
  • going with this solution for now, but i am afraid this may cause IB issues or display issues down the road while going from 'inferred' to 'freeform', hopefully i won't have to come back and update this post with any issues, + 1 for now : ) – greenhouse Sep 20 '16 at 07:36
9
  1. Select warning in the Scenes (View Controllers)
  2. Select 'Update Frames'
  3. Check 'apply to all views in the container'
  4. Select 'Fix Misplacement'

enter image description here

Or

  1. Select View in the Scenes (View Controllers) in the Storyboard
  2. Select 'Resolve Auto Layout Issues'
  3. Select 'All Views -> Update Frames'

enter image description here

Then, those warnings disappear.

tiarafreddy
  • 141
  • 1
  • 4
9

In Xcode 8.1 updated version, there is a shortcut button for this.

For cases, when only updating of the Xcode fired these warnings, just select the problematic view's superview (containing mentioned constraints), and click this update frames button:

enter image description here

pedrouan
  • 12,762
  • 3
  • 58
  • 74
5

Its easy to do in XCode 8.1 pedrouan answer is perfect. I am just adding the same answer in pictorial representation.

I just opened up my xib file of complex cell and its a lot of warnings; You can see in following picture: enter image description here

You just need to select top level view/cell in xib hierarchy and click 'Update Frames' button; Everything will become perfect. enter image description here All warnings will gone like following screenshot: enter image description here

msmq
  • 1,298
  • 16
  • 28