开发者

UIWebview works slow

开发者 https://www.devze.com 2023-01-23 03:55 出处:网络
UIWebview load the content very slow. WebView=[[UIWebView alloc]initWithFrame:self.view.bounds]; WebV开发者_Go百科iew.delegate=self;

UIWebview load the content very slow.

WebView=[[UIWebView alloc]initWithFrame:self.view.bounds];
WebV开发者_Go百科iew.delegate=self;
[WebView addSubview:spinner];
[self.view addSubview:WebView];
NSString *decodeString=[@"www.google.com" stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
[WebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:decodeString]]];

What i did wrong?

Thanks in advance

Regards, Arunkumar.P


Last two lines should be:

[WebView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.google.com/"]]];

Your webview isn't loading "slow" at the moment; implement the error delegate method and you'll see what's really happening.

0

精彩评论

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