在故事板中支持多个屏幕尺寸(3.5和4英寸屏幕) [英] Supporting Multiple Screen Sizes in Storyboards (3.5 and 4 inch screens)

查看:110
本文介绍了在故事板中支持多个屏幕尺寸(3.5和4英寸屏幕)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个适用于3.5英寸和4英寸iPhone的tic tac toe应用程序。但是,我没有成功地在故事板中找到如何做到这一点。我在使用XIB文件时找到了该选项,但在使用故事板时找不到模拟指标选项。在任一屏幕尺寸上使用它时,有没有办法让应用程序自动调整大小?感谢响应的任何人。

I am trying to create a tic tac toe app that will work on both the 3.5 and 4 inch iPhones. However, I am not successful in finding out how to do this in a storyboard. I found the option when using XIB files, but cannot find the Simulated Metrics options when using storyboards. Is there any way to have the app automatically resize when using it on either screen size? Thanks to anyone who responds.

推荐答案

是的,有一种方法可以模拟故事板中的指标。

Yes, there is a way to simulate the metrics in Storyboards.

在Xcode 5中:

打开故事板后,如果查看右下角,有一组按钮。左侧的单个按钮将在两个iPhone屏幕尺寸之间切换,因此您可以确保您的应用在两个屏幕上看起来都很好:

Once you open your storyboard, if you look in the bottom right corner, there are a set of buttons. The single button on the left will toggle between the two iPhone screen sizes, so you will be able to to make sure that your app looks good on both screens:

在Xcode 6中

只需通过单击顶部选项卡(带有三个图标)选择要模拟的ViewController,选择属性检查器并在模拟指标 - >尺寸下指定您的尺寸:

Simply select the ViewController you wish to simulate by clicking on the top tab (with the three icons), select the Attributes inspector and specify your size under Simulated Metrics -> Size:

这篇关于在故事板中支持多个屏幕尺寸(3.5和4英寸屏幕)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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