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