1

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.

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?

Community
  • 1
  • 1
Ravi
  • 3,132
  • 5
  • 24
  • 35

1 Answers1

1

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

First You have to Hide the WebView in View DidLoad.

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

Then Show the Webview after Loading Finished

 -(void)webViewDidFinishLoad:(UIWebView *)webView {
        NSLog(@"finish");   
      thewebview.Hidden=NO;
    }  
Siba Prasad Hota
  • 4,779
  • 1
  • 20
  • 40
  • I added it in my Mainview controller still it is not working. - (void)webViewDidFinishLoad:(UIWebView*)theWebView { NSLog(@"finish"); theWebView.Hidden=NO; – Ravi Dec 21 '12 at 14:48
  • 2
    Check My Updated Code :) ( You Have to Hide the Webview First) Also Check Your View BackGround Color (White or Other ? Set as per your Expectation). – Siba Prasad Hota Dec 21 '12 at 14:51
  • Thanks siba. But my issue is I dont want any bg color to be shown in between the transition from my loader to login.html. Secondly is it webView or thewebview variable. Sorry I am newbie to phone gap. Thanks – Ravi Dec 21 '12 at 14:57
  • in Phonegap the name of Webview is `thewebview` Try my Code and Let me know. – Siba Prasad Hota Dec 21 '12 at 14:59
  • Semantic Issue:Use of undeclared Variable - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view from its nib. thewebview.Hidden=YES; } Still Not working :( – Ravi Dec 21 '12 at 15:09
  • Oh i see. Actually it seems theWebview is Declared in Other Method So Hide it Where its intialized. Or else you Can declare that in .h file and Access anyWhere. – Siba Prasad Hota Dec 21 '12 at 15:17