izan
izan

Reputation: 737

problem with UIWebview

i have a problem like this :

UIViewontrollerA.m

 {
-(IBAction)loadMySite {

    MySiteViewController *controller = [[MySiteViewController alloc] initWithNibName:@"MySiteViewController" bundle:nil];

    [self.navigationController pushViewController:controller animated:YES];
    [controller release];

 }

and in my MySiteviewController.m i have this in my viewWillAppear :

NSURL *url = [[NSURL alloc] initWithString:@"http://www.mySite.fr"];

    NSURLRequest *request = [[NSURLRequest alloc]initWithURL:url];

    [self.myWebView loadRequest:request];
    self.myWebView.scalesPageToFit = YES;

}

but i takes a long time to load the web site ?

is there an other solution to do this ?? thanks four your answers

Upvotes: 0

Views: 148

Answers (1)

PeyloW
PeyloW

Reputation: 36752

Sorry but that is as fast as you can load a web page in a UIWebView. Your only alternatives would be to:

  • Make the server faster.
  • Make the data served by she server smaller.
  • Bundle the data in your app.

As an alternative to bundle data in your app, you could bundle a set of static data that is initially loaded fast, and then request the actual data from the real server. This could give the user an illusion of faster load time.

Upvotes: 1

Related Questions