Any-Any size class ignored for ios7

浪尽此生 提交于 2019-12-04 03:56:16

As per your question what you did is you have given leading,Top,height and width constraints in Any-Any Size Class.

So now its position will be fixed for any devices in landscape and portrait. Now when you changes size class to compact width and make changes in top constraints it will affect both portrait and landscape.

What you need to do using size class with Any-Any to place your controls in View controller and set those constraints which you would like to keep in both portrait and landscape.

e.g.: If you want to keep height and width fixed give those constraints in Any-Any Size Class.

Setting constraints in Any-Any Size Class will keep those constraints similar for both portrait and landscape.

1.) Setting leading and top constraints in portrait you can use width- Compact, height-Regular.

2.) Setting leading and top constraints in landscape you can use width- Any,height-Compact.

Visit link below it has the great explanation and your most of issues related to auto layout using size class will be solved:

http://mathewsanders.com/designing-adaptive-layouts-for-iphone-6-plus/

Hope this solves you problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!