I'm a little confused when seeing the new interface builder's size class options in Xcode 8 beta. I used to build my apps' UI by first design them in "Any" size class and then do some custom adjustments in the other ones. Is the workflow supposed to be changed in this new version of Xcode?
Asked
Active
Viewed 1.3k times
3 Answers
22
The UI to select the size classes has changed in xcode 8. Now it is as follows:
Any constraints that you add without selecting Vary for Traits options will be considered as for all the size classes( Any Any previously)
To add a constraint to a specific size class add it by selecting:
- The device at the bottom and by selecting Vary for Traits options of that size class.
- When you are adding constraints to a specific size class the bar turns blue as below

Durga Vundavalli
- 1,790
- 22
- 26
-
2Thank you! That's what I had learned from the WWDC 2016 video – FlySoFast Oct 08 '16 at 03:48
13
The way to do this has changed slightly in the new version of Xcode. It should build for "any-any" automatically. Have a look at this WWDC video that I think explains it in detail. There is also a part 2, so watch that if you need to.
https://developer.apple.com/videos/play/wwdc2016/222/
Hope I could help,
Zack

Zack
- 1,585
- 1
- 18
- 29
-
-
2Also see: [What's New in Auto Layout, WWDC 2016-236](https://developer.apple.com/videos/play/wwdc2016/236/) – leanne Sep 13 '16 at 22:23
-
If you don't want to see the whole video you can skip directly to the Demo at 19:00 which pretty much sums it all up. – DJTano Nov 02 '16 at 16:29
2
To convert from the old Any by Any to the new Trait layout, go through each of your View Controllers and update all frames.

Petter Friberg
- 21,252
- 9
- 60
- 109

Starchand
- 684
- 1
- 9
- 23