开发者

The UIWebView doesn't display url

开发者 https://www.devze.com 2023-03-08 15:57 出处:网络
I Load UIWebView using this code : NSString *a=@\"http://www.google.com/\"; NSURLRequest *theRequest=[NS开发者_Go百科URLRequest requestWithURL:[NSURL URLWithString:a]];

I Load UIWebView using this code :

NSString *a=@"http://www.google.com/";
NSURLRequest *theRequest=[NS开发者_Go百科URLRequest requestWithURL:[NSURL URLWithString:a]];
[aWebView loadRequest:theRequest];

But nothing is loaded? What I do wrong?

Please help me


try This code may be helped............

   UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(50, 100, 690, 750)];
//webView.delegate=self;    
NSString *urlAddress = @"http://www.google.com/";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];
[self.view addSubview:webView];
0

精彩评论

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