xcode 如何在 iOS Simulator 5.1 周围恢复 iPad 框架?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9756327/
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
How can I restore the iPad frame around iOS Simulator 5.1?
提问by NickT
With Xcode 4.3.1, Apple ships the new iOS 5.1 Simulator. Unfortunately, it looks like when you run iPad hardware, there's no longer the iPad frame around the sim window. Does anyone have any idea how to restore that frame? I often use the simulator to demo features to others via screen sharing, and it looks much better when it's in the iPad frame. Thanks in advance.
在 Xcode 4.3.1 中,Apple 发布了新的 iOS 5.1 模拟器。不幸的是,看起来当您运行 iPad 硬件时,sim 窗口周围不再有 iPad 框架。有谁知道如何恢复该框架?我经常使用模拟器通过屏幕共享向其他人演示功能,并且在iPad框架中看起来更好。提前致谢。
Interestingly, btw, there's no longer a frame.png
. Instead, now within iOS Simulator's package, you only find: ./Contents/Resources/frame_1only_.png
有趣的是,顺便说一句,不再有frame.png
. 相反,现在在 iOS Simulator 的包中,您只能找到:./Contents/Resources/frame_1only_.png
采纳答案by CodaFi
Download Xcode 4.2.1 from the dev center... other than that, there's nothing you can do about it. Besides, I rather like the new minimalistic simulator. (BTW, there is a rationale behind this: the new retina simulator is just too big to provide a good bezel image).
从开发中心下载 Xcode 4.2.1...除此之外,您无能为力。此外,我更喜欢新的简约模拟器。(顺便说一句,这背后有一个基本原理:新的视网膜模拟器太大而无法提供良好的边框图像)。
EDIT (to address the core of the problem): Even if you could find a suitable bezel image, how could you edit the internals of the simulator? My proposal is: find an old Xcode with the proper sim, or mod the simFinger application to include an iPad frame (to my knowledge, it only works with the iPhone sim), and iPad dimensions. Available here: https://github.com/atebits/SimFinger
编辑(解决问题的核心):即使您可以找到合适的边框图像,您如何编辑模拟器的内部结构?我的建议是:找到一个带有适当 sim 的旧 Xcode,或者修改 simFinger 应用程序以包含 iPad 框架(据我所知,它仅适用于 iPhone sim)和 iPad 尺寸。可在此处获得:https: //github.com/atebits/SimFinger
EDIT 2: As it turns out, it does support the iPad, and bezel!
编辑 2:事实证明,它确实支持 iPad 和边框!
回答by user1700583
The frame disappears if the simulator + frame does not fit on your screen. If I move it to my big external monitor, switch to iPhone and back to iPad, I have the frame again.
如果模拟器 + 框架不适合您的屏幕,框架就会消失。如果我把它移到我的大外接显示器上,切换到 iPhone 并回到 iPad,我就会再次拥有框架。
回答by Federico
As everyone said, make sure your simulator zoom is set to 100% by using CMD-1.
正如大家所说,请确保使用 CMD-1 将模拟器缩放设置为 100%。
With the new retina resolution, you need to have a Retina Macbook to get it to work. You have to set your display resolution to max, and reset the simulator. This will then show the frame around both the iPad and iPad Retina simulators.
使用新的 Retina 分辨率,您需要有 Retina Macbook 才能使其工作。您必须将显示分辨率设置为最大值,然后重置模拟器。这将显示 iPad 和 iPad Retina 模拟器周围的框架。
回答by alademann
I'm not sure if this is a bug, or a legitimate workaround, but if you are using the iOS 5.1 simulator, and go to Hardware > TV Out - turn on any of the options (uncheck disabled), the frame suddenly appears around the device.
我不确定这是错误还是合法的解决方法,但是如果您使用的是 iOS 5.1 模拟器,然后转到硬件 > 电视输出 - 打开任何选项(取消选中禁用),框架会突然出现装置。
Again... don't know if that will stick in future versions of xCode, but it worked for me for now!
再次......不知道这是否会保留在 xCode 的未来版本中,但它现在对我有用!
回答by Nathan Gopen
It appears it is looking at whether or not there is adequate screen resolution to display the bezel. For example, I have a 17" Macbok pro that I develop on (1920x1200 resolution). When I launch an iPad development project and the suimulator comes up on my Macbook pro's desktop, no problem, the bezel shows. But let's say I then drag it over to my external monitor which is 1920x1080, then quit and relauinch the simulator... it comes up without a bezel.
看起来它正在查看是否有足够的屏幕分辨率来显示边框。例如,我有一台 17" Macbok pro 用于开发(1920x1200 分辨率)。当我启动 iPad 开发项目时,模拟器出现在我的 Macbook pro 桌面上,没问题,边框显示。但假设我然后拖动它转到我的 1920x1080 外接显示器,然后退出并重新启动模拟器......它没有边框。
My co-worker who has a Macbook Pro 13" (lower resolution), never sees the bezel. I suspect the newer retina Macbook Pros will always show a bezel.
我的同事拥有 Macbook Pro 13"(较低分辨率),从来没有看到边框。我怀疑较新的视网膜 Macbook Pro 总是会显示边框。
This is of course, al pertaining to the regular, non-retina iPad simulator. I am not sure if given adequate screen resolution, the iPad retina simulator would show a bezel or not?
这当然与常规的非视网膜 iPad 模拟器有关。我不确定如果给定足够的屏幕分辨率,iPad 视网膜模拟器是否会显示边框?
回答by zumpar
For me, in the iOS simulator, clicking on: Hardware -> Device -> iPhone (not the retina ones).
对我来说,在 iOS 模拟器中,点击:硬件 -> 设备 -> iPhone(不是视网膜的)。
and then: Window -> Scale -> 100% fixed the problem, and the frame reappeared.
然后:Window -> Scale -> 100% 修复了问题,框架重新出现。
On my work 13inch MBP, I can see the frame only with this setting.
在我的作品 13 英寸 MBP 上,我只能在此设置下看到框架。
回答by noobular
CMD + 1 and CMD + 2 keyboard shortcuts toggle the simulators view mode. Depending on the device, retina or non retina, you will see the bezel if your screen resolution can accomodate it.
CMD + 1 和 CMD + 2 键盘快捷键切换模拟器查看模式。根据设备,视网膜或非视网膜,如果您的屏幕分辨率可以容纳它,您将看到边框。
回答by Adam Silverthorne
Window->Scale->100% did the trick for me... when it gets set to 75% it loses the frame
Window->Scale->100% 对我有用……当它设置为 75% 时,它会丢失帧