模拟指标有什么影响? [英] What impact does simulated metrics have?

查看:91
本文介绍了模拟指标有什么影响?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用.xib文件时,更改模拟指标会对您的代码/应用产生什么影响?或者它只是为了您作为预览工具的好处?

When using .xib files what impact on your code/app does changing simulated metrics have? Or is it just for your benefit as a preview tool?

推荐答案

模拟指标主要是设计帮助,帮助您布局界面。它们对.xib * [1]几乎没有直接影响。它们非常有用,因为您可以模拟像导航控制器中嵌入的视图控制器之类的东西,因为导航栏占用了一些空间,所以可以减少使用空间。如果您正在布局仅在横向中使用的viewController,它们也非常方便。在他们介绍的时候,这是检查你的界面在较短的iPhone 4显示器和较高的iPhone 5显示器上看起来如何的唯一方法* [2]。

The Simulated Metrics are mostly a design aid to help you lay out your interface. They have little direct impact on the .xib*[1]. They are very helpful because you can simulate things like your view controller being imbedded in a navigation controller, which gives you less space to work with since the navigation bar takes up some space. They are also very handy if you are laying out a viewController that will only be used in landscape. At the time they were introduced, it was the only way to check how your interface would look on the shorter iPhone 4 display and the taller iPhone 5 display*[2].

我经常将大小设置为 iPhone 4英寸,因为:1)我发现在广场viewController工作分散注意力,2)它占用的屏幕空间更少,这让我可以在我的笔记本电脑显示屏上查看更多我的故事板。将大小类更改为 wC hR 时,此方法的危险性要小得多,因为后者实际上会影响对不同大小的设备使用哪些约束。

I frequently set the Size to iPhone 4 inch because: 1) I find working in the square viewController distracting, 2) It takes up much less screen real estate allowing me to see more of my Storyboard on my laptop display. This method is much less dangerous that changing the size class to wC hR because the latter will actually affect which constraints are used for different sized devices.

[1] 大小方向指标会影响viewController的大小,因为它存储在<$ c中$ c> .xib 或 .storyboard 文件。如果您将设置保留为 Inferred ,Xcode将使用 600 x 600 作为viewController的大小。通常,这没有区别,因为viewController在加载时将适当地调整大小。

[1] The Size and Orientation metrics will affect the size of the viewController as it is stored in the .xib or .storyboard file. If you leave the setting as Inferred, Xcode will use 600 x 600 as the viewController's size. Normally, this makes no difference, because the viewController will be properly sized to the device when it loads.

[2]当时模拟指标介绍,这是测试iPhone 4s设计与新高iPhone 5的方式。此后Apple推出了其他更好的方法来检查各种尺寸设备的设计。

[2] At the time Simulated Metrics were introduced, this was the way to test designs for the iPhone 4s vs. the new taller iPhone 5. Apple has since introduced other better ways of checking out designs on various sized devices.

这篇关于模拟指标有什么影响?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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