Is there a way by which the constraints I give in portrait orientation DO NOT apply in landscape orientation and vice versa.
I am working on an app which has a lot of small images and text fields on the screen. I need to give different positions and coordinates when these are in Portrait and Landscape orientation.
With iOS8/Xcode6 there are Size Classes .
Here's all the magic:
With the same storyboard, you can set different constraints for different kind of device, with no code.
On the left, the regular layout. On the right, the layout when there's a compact width.
You can see that the bottom bar turns blue when you are in a specific size class, meaning you only make changes on that particular size class.
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.