iPhone纵向横向自适应UI的示例,它与iOS 7向后兼容 [英] Example for iPhone portrait landscape adaptive UI which is backwards-compatible with iOS 7

查看:236
本文介绍了iPhone纵向横向自适应UI的示例,它与iOS 7向后兼容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已阅读此主题
Xcode 6自适应UI如何向后兼容iOS 7和iOS 6?

特别是答案来自Dave和Joey。

and especially the answers from Dave and Joey.

我仍然很难找到一个简单的例子:
xcode 6,启用大小类,iPhone iOS 7,uibutton纵向模式下宽度100,横向模式下宽度400。在iPad上说宽度为600.

Still I am having a hard time getting a simple example to work: xcode 6, size classes enabled, iPhone iOS 7, uibutton width 100 on portrait mode, width 400 on landscape mode. And say width 600 on iPad.

我无法让它工作。我尝试了不同的设置宽度约束组合,但是在两种方向模式下按钮宽度都是100,或400,但从不相同。

I just can't get this to work. I tried different combinations of setting width constraint, but either the button width is 100 in both orientation modes, or 400, but never different.

如果有人能给我,我将不胜感激我是一个指南,必须在哪个大小等级上设置约束来实现这一点。

I would appreciate if someone could give me a guide, which constraints have to be set on which size class to achieve this.

谢谢,

推荐答案

对于iPhone,在早期iOS版本上部署具有大小类的应用程序表示高度组件的值对于早期版本不应该是紧凑的。但是在适应性和布局中,横向模式iPhone的紧凑高度和紧凑宽度,这意味着尺寸类的iPhone横向模式不适用于早期版本。

For iPhone, Deploying an App With Size Classes on Earlier iOS Versions said that the value of the height component should not be compact for earlier version. But in Adaptivity and Layout, the landscape mode of iPhone is Compact height and Compact Width, which means that iPhone landscape mode of size classes will not work for earlier version.

这篇关于iPhone纵向横向自适应UI的示例,它与iOS 7向后兼容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆