Adaptive Layout in Xcode 8

2019-02-21 14:16发布

问题:

I am developing app using Xcode 8 (beta 1). Unfortunately, I am not able to find "Size Classes" option.

In Xcode 7, there was option "Use Size Classes".

But in Xcode 8 there is no such option. Is there any help for using Size Classes or similar in Xcode 8?

回答1:

Now you have "Use Trait Variations" which is improved version of Size Classes


You can now select device based and orientation based trait view much like size classes (iPad Pro, iPad, iPhone 6Splus, iPhone 6s, iPhone SE and iPhone 4s)



回答2:

Apple introduce new feature called Trait Variations.

So now you can simply create how it looks on real device.

You can simply switch devices by just clicking and also change the orientation of your view.