Phonegap显示白屏后的闪屏 - IOS [英] Phonegap showing white screen after the splash screen - IOS

查看:396
本文介绍了Phonegap显示白屏后的闪屏 - IOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图杀死在启动我的phonegap应用程序后,在启动屏幕之前登录页面自动加载两秒的whitescreen。

I am trying to kill the whitescreen which automatically loads for two secs after I launch my phonegap application after the splash screen before the login page.

我已经尝试过 AutoHideSplashScreen到NO 并添加了 navigator.splashscreen.hide ; 在下面引用的login.html中。但它杀了闪屏,而不是白色屏幕。现在启动应用程序,它直接到login.html没有启动画面。请帮助我杀死默认白屏在splash screen和login.html之间。

I have tried the AutoHideSplashScreen to NO and added navigator.splashscreen.hide(); in the login.html as referenced in the below reference. But it killed the splash screen instead of white screen. Now on launching the app it takes directly to login.html without a splash screen. Please help me out killing the default white screen between splash screen and login.html.

how to to kill the white flickering splashscreen at the start of phonegap iOS app ?

推荐答案

ViewController的ViewDidload中,隐藏 Webview webViewDidFinishLoad方法。

In your ViewController's ViewDidload, Hide the Webview and After It will Load Show it in webViewDidFinishLoad method.

首先你必须在视图DidLoad中隐藏WebView。

First You have to Hide the WebView in View DidLoad.

- (void)viewDidLoad
{
    [super viewDidLoad];
thewebview.Hidden=YES;
} 

然后在加载完成后显示Webview

Then Show the Webview after Loading Finished

 -(void)webViewDidFinishLoad:(UIWebView *)webView {
        NSLog(@"finish");   
      thewebview.Hidden=NO;
    }  

这篇关于Phonegap显示白屏后的闪屏 - IOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆