简体   繁体   English

iOS Cordova应用程序上的白屏闪烁

[英]White screen flashing on iOS Cordova app

I created a HelloWorld app with Cordova: 我用Cordova创建了一个HelloWorld应用:

cordova create hello ; cd hello ; cordova platform add ios

When I run it on iOS, a white blank screen flashes just before the app is loaded. 当我在iOS上运行它时,在加载应用程序之前,白色的空白屏幕会闪烁。 How can I get rid of this flashing? 我如何摆脱这种闪烁?

I found many solutions with splash screen configuration, but I don't want a splash screen in my app. 我发现了许多具有初始屏幕配置的解决方案,但我不希望在我的应用程序中出现初始屏幕。 (The HelloWorld already has a splash screen, but this does not prevent the flashing problem.) I also tried to set the background-color to black with no success. (HelloWorld已经有一个启动屏幕,但这不能防止闪烁问题。)我还尝试将背景色设置为黑色,但没有成功。

You must have a splash screen in your app. 您的应用程序中必须有一个初始屏幕。 If you don't have one, users might think their phone is frozen if an app takes a long time to load. 如果您没有手机,则用户可能会认为,如果某个应用需要很长时间才能加载,其手机将被冻结。

For handling this issue, include a launch screen that resembles the first actual screen of your app. 要处理此问题,请包括一个类似于您应用的第一个实际屏幕的启动屏幕。

For more information, check out iOS Human Interface Guidelines . 有关更多信息,请查看《 iOS人机界面指南》

To get rid of this, the only solution I found was to install the splashscreen plugin and create a black screen image. 为了摆脱这种情况,我发现的唯一解决方案是安装启动画面插件并创建黑屏图像。 I also set the preference TopActivityIndicator to whiteLarge. 我还将首选项TopActivityIndi​​cator设置为whiteLarge。 Too bad that Cordova does not work better out of the box. 太糟糕了,科尔多瓦开箱即用时效果不佳。

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

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