简体   繁体   中英

Different Constraints for Different Size Classes

Is it possible to have different constraints/views for different size classes in Xcode? I am trying to constraint from an inferred view but it messes up the views for different size classes so is it possible just to make a different view for each size class?

Constraints, yes. That's the entire point of size classes. You should probably read through apple's docs on the matter. As far as I know there isn't a built in way to truly have different views per se, but you can can choose to show/hide views in different sizes. Regardless, Apple would recommend you use a nib/storyboard and work with all sizes/devices using the same storyboard/nibs and classes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM