Adaptive Layout in Xcode 8
11,649
Solution 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)
Solution 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.
Author by
Khawar
Updated on July 18, 2022Comments
-
Khawar almost 2 years
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?
-
Satyam over 7 yearsHow can I have common layout for all resolutions? w - Any h - Any
-
RyanTCB over 7 yearsAll iPhones in portrait at wC hR so how to make different layouts for 7+ and 4s sizes?
-
Dhruv Khatri over 7 yearsThe new layout video is uploaded by apple you can also assign some layout objects for only some devices.
-
RyanTCB over 7 yearsI see that video but that's when devices have different Traits. Sadly as all iPhones in portrait have same traits they cant be used to make adaptive layouts
-
Marlon Ruiz over 7 yearsPrior to Xcode 8, any needed to be explicit, and in some places you’ll find explicit uses of any still. Often Xcode 8 hides Any from you, making it implicit instead of explicit. This resource could be useful to you: makeapppie.com/2016/09/05/…
-
Tal Zion over 7 years@DhruvKhatri How can I set different Vary traits for different iPad orientation?
-
Dhruv Khatri over 7 yearsCheck out this two videos this will guide you @TalZion Check out Making Apps Adaptive, Part 1 from #WWDC 2016 developer.apple.com/wwdc16/222 Part 2 from #WWDC 2016 developer.apple.com/wwdc16/233
-
Ethan Parker about 7 yearsSo I have Use Auto Layout and Trait Variations checked, and my view controllers change size on IB, great. But I thought with Size Classes you could change the view in IB, do some work, then it would save those changes ONLY for that size?