UIWebView不显示网址 [英] The UIWebView doesn't display url
本文介绍了UIWebView不显示网址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用以下代码加载UIWebView:
I Load UIWebView using this code :
NSString *a=@"http://www.google.com/";
NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:a]];
[aWebView loadRequest:theRequest];
但是什么都没有加载?我做错了什么?
But nothing is loaded? What I do wrong?
请帮助我
推荐答案
尝试此代码可能会有所帮助.........
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];
这篇关于UIWebView不显示网址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文