xcode 模拟器在 iPhone 6 Plus 的缩放模式下运行?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25752986/
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
Simulator running in scaling mode for iPhone 6 Plus?
提问by Nick
My app starts and runs on the new iPhone 6 Plus (or iPhone 6) in the simulator, but elements that I know are supposed to be small on the big screen (i.e. hard coded CGRect
s) are large, as if the whole app had just been scaled up for the larger screen.
我的应用程序在模拟器中的新 iPhone 6 Plus(或 iPhone 6)上启动并运行,但我知道在大屏幕上应该很小的元素(即硬编码CGRect
)很大,就好像整个应用程序刚刚被放大到更大的屏幕。
How can I get out of scaling mode in the simulator?
如何在模拟器中退出缩放模式?
回答by s4y
It looks like setting a launch screen file in the "App Icons and Launch Images" section of your project settings, or adding iOS 8 images to your launch image catalog, will enable "native" resolution.
在项目设置的“应用程序图标和启动图像”部分设置启动屏幕文件,或将 iOS 8 图像添加到启动图像目录中,似乎将启用“本机”分辨率。
回答by Rivera
Adding a correctly sized LaunchImage seems to be enough (setting an incorrectly sized image won't).
添加大小正确的 LaunchImage 似乎就足够了(设置大小不正确的图像不会)。
Also adding the new "Launch Screen File" should work:
另外添加新的“启动屏幕文件”应该可以:
回答by Narek Safaryan
You must set correctly sized LaunchImages
For more information about LaunchImages and icons see this documentation
您必须设置正确大小的 LaunchImages
有关 LaunchImages 和图标的更多信息,请参阅此文档
回答by brian.clear
use Asset Catalog Creator from mac app store.
使用 mac 应用商店中的 Asset Catalog Creator。
https://itunes.apple.com/gb/app/asset-catalog-creator-app/id809625456?mt=12
give it any image and it will generate all the correct launch images and icons in a xassets file.
给它任何图像,它将在 xassets 文件中生成所有正确的启动图像和图标。
This should stop the scaling of the whole app on iphone 6+
这应该会停止 iphone 6+ 上整个应用程序的缩放