Shaliko Usubov
Shaliko Usubov

Reputation: 477

Show launch image until webView load

How I can show launch image until webView load?

Now when I start my app, I see launch image then 5 second empty screen then google.com site. I want show launch image instead 5 second empty screen. I have Xcode version 4.3.1.

My XViewController.m

- (void)viewDidLoad
{
    [super viewDidLoad];

    // Do any additional setup after loading the view, typically from a nib.
    [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://google.com"]]];
}

Upvotes: 0

Views: 896

Answers (3)

Tony
Tony

Reputation: 3478

You could add a UIImageView on top of your app's main view, with your launch image in it. When the web page finishes loading, remove the UIImageView.

Upvotes: 2

Vikas S Singh
Vikas S Singh

Reputation: 1766

Try this code may be helped..

[NSThread sleepForTimeInterval:3.0];

// written this code in the App delegate didFinishLaunchingWithOptions.

Upvotes: 0

Pavan Kumar
Pavan Kumar

Reputation: 258

we are having the delegate methods like

- (void)webViewDidStartLoad:(UIWebView *)webView
- (void)webViewDidFinishLoad:(UIWebView *)webView

go through them they will help u

Upvotes: 1

Related Questions