简体   繁体   English

为什么助手预览失败?

[英]Why Assistant preview fails?

my assistant editor show me the right way I want my apps look like in big screen, but in the emulator or real device isn't the desirable results. 我的助理编辑向我展示了我希望我的应用在大屏幕上显示的正确方法,但是在模拟器或真实设备中并不是令人满意的结果。 Why? 为什么? That's only an example, i Will this behavior in all my view controllers. 这只是一个例子,我将在所有视图控制器中执行此操作。 NO, simulators hasn't the zoom mode feature so It can't be zoom mode. 不,模拟器没有缩放模式功能,因此不能是缩放模式。

RIGHT assistant editor: RIGHT助理编辑:

在此处输入图片说明

WRONG simulator behavior: 错误的模拟器行为:

在此处输入图片说明

The assistant preview doesn't fail, but the simulator zooms your app (you can see it at the size of the status bar). 助手预览不会失败,但是模拟器会缩放您的应用程序(您可以在状态栏的大小处看到它)。

You probably did not include a launch image for 4,7" and 5" screen devices. 您可能没有包括用于4,7“和5”屏幕设备的启动图像。 If the app can't find these launch images, it will run the same as on a 4" screen and zoom it to fit the device. 如果应用程序找不到这些启动图像,它将与在4英寸屏幕上运行的图像相同,并进行缩放以适合设备。

The assistant editor does not look for those images, as it's simply a render of your storyboard with the constraints you set. 助理编辑器不会查找这些图像,因为它只是具有您设置的约束的情节提要的呈现。

Add the launch images for the 4,7" and 5" screens and the app will look fine on the simulator. 添加4,7“和5”屏幕的启动图像,该应用程序在模拟器上将正常显示。 You can also use a .xib file to generate a launch image for iOS 8+. 您还可以使用.xib文件为iOS 8+生成启动映像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM