我使用pushViewController导航到我的Webview(在基于导航的应用程序中),并且在Webview中使用NSLog检查URL。事实证明,URL成功传递了,但是Webview除了黑色背景之外什么都没有显示。
WebViewController *webView = [[WebViewController alloc] init];
[webView setUrl:finalURL];
[self.navigationController pushViewController:webView animated:YES];
在WebViewController.m ---- viewWillAppear中:
NSLog(@"%@", _url); // I got the url!!!!!!!!!
[webView loadRequest:[NSURLRequest requestWithURL:_url]];
最佳答案
您是否已将Web View插座连接到webView
?在.xib
文件中
关于ios - iOS UIWebView只显示黑色背景,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/10899291/