Reputation: 3
I would like to know whether there is any way to specify constraints explicitly for a particular device(iPhone 6,iPad Air etc..) on Xcode interface builder.
Upvotes: 0
Views: 1591
Reputation: 14477
Yes, you can assign constraint to particular device size, it's not a specific device like iPhone 5Se or iPhone 6 but is kind of specific size classes, like compact or regular.
Click on view as on the bottom left of storyboard and you will see different options of devices size, now on the bottom right of storyboard you can see vary for traits.
Now if you click height you can see devices which will effect and if you add any constraint or view here it will only affect these devices.
If you deselect height and select width, you will see different set of devices
You can use mix and match and set different constraints and can add different views for different size classes.
For more info on this please visit following links
Upvotes: 4