开发者

problem with UIWebview

开发者 https://www.devze.com 2023-03-05 04:26 出处:网络
i have a problem like this : UIViewontrollerA.m { -(IBAction)loadMySite { MySiteViewController *controller = [[MySiteViewController alloc] initW开发者_如何学PythonithNibName:@\"MySiteViewControlle

i have a problem like this :

UIViewontrollerA.m

 {
-(IBAction)loadMySite {

    MySiteViewController *controller = [[MySiteViewController alloc] initW开发者_如何学PythonithNibName:@"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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消