在Xcode 6中开发通用 [英] Developing universal in Xcode 6

查看:120
本文介绍了在Xcode 6中开发通用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装了Xcode 6 beta,我正在尝试开发通用应用。在Xcode 6之前,你必须为iPad和iPhone创建2个独立的故事板,你可以在部署信息中设置它。

I have Xcode 6 beta installed and I'm trying to develop an universal app. Before Xcode 6, you had to create 2 separate Storyboards for iPad and iPhone and you could set it in the Deployment Info.

在Xcode 6中,似乎分离已经消失。没有2个标签可以单独设置故事板。

In Xcode 6, it seems that separation is gone. There aren't 2 tabs to set the storyboards individually.

当您创建故事板时,系统会要求您选择设备系列。

But when you go to create a Storyboard, you are asked to choose a device family.

有人可以解释Xcode 6中发生了什么吗?

Can someone explain what's going on in Xcode 6 please?

谢谢。

推荐答案

要支持新的大小类,您需要在故事板的文件检查器中启用使用大小类。这将允许您为多种设备大小配置故事板。

To support the new Size Classes, you'll need to enable "Use Size Classes" in the File Inspector of your storyboard. This will allow you to configure your storyboard for multiple device sizes.

请注意,这将使您的故事板与Xcode 5不兼容。

Note that this will make your storyboard incompatible with Xcode 5.

启用此功能后,您将看到屏幕底部显示尺寸选择器。使用它来选择您的设备尺寸:

When you've enabled this, you'll see the size selector appear at the bottom of the screen. Use this to select your device size:

在项目首选项中,您仍然可以使用dropbown框为iPhone或iPad选择不同的故事板。请注意,如果为每个设备选择不同的故事板,故事板名称将保持不变。

In your project preferences, you can still select a different storyboard for iPhone or iPad using the dropbown box. Notice that the storyboard name will persist if you select a different one for each device.

虽然这仍然是一个选项,但Apple正在将开发人员转向一个统一的故事板。

Even though this is still an option, Apple is moving developers towards a single, unified storyboard.

这篇关于在Xcode 6中开发通用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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