ios XCode iPhone 模拟器看起来不像 iPhone

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19245853/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 02:12:11  来源:igfitidea点击:

XCode iPhone simulator does not look like an iPhone

iosiphonexcodeios-simulatorinstruments

提问by mm24

Silly question, but.. I am not been able to see the device appearance when running the iPhone simulator. I don't remember after which XCode update this started but the iPhone simulator shows only as a simple window without showing the device case like it used to be(see this image).

愚蠢的问题,但是.. 我在运行 iPhone 模拟器时看不到设备外观。我不记得这是在哪个 XCode 更新之后开始的,但 iPhone 模拟器仅显示为一个简单的窗口,而没有像以前那样显示设备外壳(请参阅此图片)。

That's how my simulator looks like:

这就是我的模拟器的样子:

simulator

模拟器

Is there a way to make it look like an actual iPhone 5?

有没有办法让它看起来像真正的 iPhone 5?

EDIT: Unfortunately in my hardware->device options I see only iPhone retina (which is currently selected), but there are no more options. So it seems like the default beheaviour to look like a thin window, unless I missed out some other configuration.

编辑:不幸的是,在我的硬件-> 设备选项中,我只看到 iPhone 视网膜(当前已选择),但没有更多选项。所以看起来像一个薄窗口的默认行为,除非我错过了其他一些配置。

Here is what I see overlayed to a user answer.

这是我看到的覆盖到用户答案的​​内容。

enter image description here

在此处输入图片说明

回答by rickster

The Simulator window only shows an iPhone (4/4s) bezel when:

在以下情况下,模拟器窗口仅显示 iPhone (4/4s) 边框:

  1. The simulated device is a 3.5 inch non-Retina iPhone, and

  2. The window scale is 100%.

  1. 模拟设备是 3.5 英寸非 Retina iPhone,并且

  2. 窗口比例为 100%。

In Xcode 5, you can't do the first one unless you download the iOS 6.1 simulator, because 3.5 inch non-Retina devices are not supported by iOS 7.

在 Xcode 5 中,除非下载 iOS 6.1 模拟器,否则无法进行第一个,因为 iOS 7 不支持 3.5 英寸非 Retina 设备。

(For simulated devices other than 3.5-inch non-Retina, you'll also see a bezel at 100% scale, but this bezel doesn't look exactly like any particular device.)

(对于 3.5 英寸非 Retina 以外的模拟设备,您还会看到 100% 比例的边框,但该边框看起来并不完全像任何特定设备。)

If you want device images to use in promotional artwork for your app, see Apple's App Store Marketing Resourcespage.

如果您希望设备图像用于您应用的宣传图稿,请参阅 Apple 的App Store 营销资源页面。

回答by Buntylm

First of all this does with retina devices.

首先,这与视网膜设备有关。

STEP 1:Follow this step if you using Xcode 5as you need to download the iOSsimulator.

STEP 1:如果您使用Xcode 5,请按照此步骤下载iOS模拟器。

Go to XCode,

XCode,

  • Open the main XCode Preferencesoption then Downloads. Click on iOS 6 SimulatorChange to the simulator you want by going to the "Hardware" menu. Close the simulator. Run the project.
  • Preferences然后打开主 XCode选项DownloadsiOS 6 Simulator转到“硬件”菜单,单击“ 更改为您想要的模拟器”。关闭模拟器。运行项目。

STEP 2:

第2步:

As you required just change device from Hardware -> device to iPhone as shown in the image.

如图所示,您只需将设备从硬件 -> 设备更改为 iPhone。

enter image description here

在此处输入图片说明

And in the next step be sure set the window scale to 100 %. enter image description here

并在下一步中确保将窗口比例设置为100 %在此处输入图片说明

回答by Sreejith

The problem I think is not with your XCode, but with your display. Check this : iPhone skin on Simulator

我认为问题不在于您的 XCode,而在于您的显示器。检查这个:模拟器上的iPhone皮肤

回答by Andrew

For some reason it looks like an iPhone on my retina Macbook Pro, but not on my iMac. They're probably looking at the resolution of the Mac, which doesn't really make sense, since you see less at 2880x1800 retina, than 1920x1080 non retina.

出于某种原因,它在我的 Retina Macbook Pro 上看起来像 iPhone,但在我的 iMac 上却不是。他们可能正在查看 Mac 的分辨率,这实际上没有意义,因为您在 2880x1800 视网膜上看到的比在 1920x1080 非视网膜上看到的要少。

回答by richbuilder3

I've had this issue also. As indicated earlier, I went to preferences, downloads and then clicked on the ios 6.1 download. After installing it gave me the option of the "iphone". This option actually looks like the iphone. After the install it still includes the retina options as well.

我也遇到过这个问题。如前所述,我转到首选项、下载,然后单击 ios 6.1 下载。安装后它给了我“iphone”的选项。这个选项实际上看起来像 iphone。安装后它仍然包括视网膜选项。

回答by Francis Moy

It could be a scaling issue. In the simulator toolbar, go to Window -> Scale, and make sure that 100% is checked. Regarding how to enable iPhone non-retina if not shown, I wrote some steps in my blogon how to do it.

这可能是一个缩放问题。在模拟器工具栏中,转到 Window -> Scale,并确保选中 100%。关于如何启用 iPhone non-retina 如果未显示,我在我的博客中写了一些关于如何操作的步骤。

回答by Manni

Absolutely correct, im using IOS simulator 7.0, there is no option regarding this. i did every possible step to make it look like iPhone but hard luck IOS simulator not having this option in Devices.

绝对正确,我使用的是 IOS 模拟器 7.0,对此没有选项。我做了一切可能的步骤让它看起来像 iPhone,但不幸的是 IOS 模拟器在设备中没有这个选项。

回答by Bajaj

enter image description here

在此处输入图片说明

Check this Goto IOS Hardware >>Device >>iPhone then window +1

检查这个转到IOS硬件>>设备>>iPhone然后窗口+1

回答by Grzegorz Krukowski

Unfortunately it works like that for anything else - there is no option to show a case for any other simulators.

不幸的是,它对其他任何东西都是如此 - 没有选择为任何其他模拟器显示案例。