的UIWebView中不显示URL

我加载UIWebView中使用此代码:的UIWebView中不显示URL

NSString *[email protected]"http://www.google.com/"; 

NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:a]];

[aWebView loadRequest:theRequest];

但没有被加载?我做错了什么?

请帮我

回答:

试试这个代码可以帮助............

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中不显示URL 的全部内容, 来源链接: utcz.com/qa/258084.html

回到顶部