如何消除phonegap iOS应用程序启动时的白色闪烁闪屏?
如何摆脱 PhoneGap iOS 应用程序启动时闪烁的白色闪屏?
How to get rid of the white splashscreen flickering at the start of a phonegap iOS application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
您需要进入
PhoneGap.plist
并将AutoHideSplashScreen
设置为NO
然后,每当您需要在应用程序中时,您都可以选择隐藏闪屏以下代码:
希望这有帮助
You need to go in
PhoneGap.plist
and set theAutoHideSplashScreen
toNO
Then whenever you want in your app you can choose to hide the splashscreen with the following code :
Hope this helps
您可以将 default.png 和 [email protected] 初始屏幕更改为某些内容更符合你的喜好。这样就消除了白色背景。
您可以在 Xcode 4x 项目的 appname/appname/Resources/Splash 文件夹中找到这些资源。
You can change the default.png and [email protected] splash screens to something more of your liking. That gets rid of the white background.
You can find these resources in the appname/appname/Resources/Splash folder in an Xcode 4x project.
我的插件有问题,或者phonegap有问题,所以
对我不起作用。
我通过将 webview alpha 设置为 0 直到加载来修复它:
3 个步骤:
self.webView.alpha=0;
现在,在内容完全加载之前,我将使用黑色屏幕闪光灯,而不是白色屏幕闪光灯。
对我来说足够好了。 (虽然不完美)
希望这有帮助..
I have a problem with the plugins or some problem with phonegap so
doesn't work for me.
I fixed it by setting the webview alpha to 0 until it's loaded:
3 steps:
self.webView.alpha=0;
Now instead of a white screen flash I have a black one until the content is fully loaded.
good enough for me. (although not perfect)
hope this helps..
如果您添加了 SplashScreen 插件,但
navigator.splashscreen
仍然未定义,您可以尝试:If you have added SplashScreen plugin but
navigator.splashscreen
is still undefined, you can try: