iPhone4 和 iPhone5 可以使用相同的 xib 吗? [英] Same xib for iPhone4 and iPhone5 possible?

查看:38
本文介绍了iPhone4 和 iPhone5 可以使用相同的 xib 吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么办法可以使用相同的 xib 为 iPhone4 和 iPhone5 设计我的类吗?

Is there any way I can design my classes for both iPhone4 and iPhone5 using the same xib?

推荐答案

是的,您可以使用相同的 XIB 通过使用自动布局为 iPhone 4 和 iPhone 5 进行设计.

Yes, you can use the same XIB to design for iPhone 4 and iPhone 5 by using Auto-Layout.

使用 iOS 6 作为基础 SDK 构建一个应用程序,并使用自动布局功能制作可针对所有类型屏幕缩放的屏幕.您需要 Xcode 4.5 才能执行此操作.

Build an app using iOS 6 as the Base SDK and use the Auto Layout feature to make screens that can scale for all type of screens. You'll need Xcode 4.5 to do this.

从这里开始使用自动布局:
http://www.raywenderlich.com/20881/beginning-auto-layout-第 1-of-2
http://www.raywenderlich.com/20897/beginning-auto-layout-部分 2-of-2

Get started with Auto Layout here:
http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2
http://www.raywenderlich.com/20897/beginning-auto-layout-part-2-of-2

这篇关于iPhone4 和 iPhone5 可以使用相同的 xib 吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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