【发布时间】:2013-11-27 10:15:51
【问题描述】:
我正在按照this 教程创建一个 webView 应用程序。我完全按照所有步骤操作,但出现此错误:
No visible @interface 'UIView' declares the selector 'loadRequest'
-
- (void)viewDidLoad
{
[super viewDidLoad];
NSString *fullURL = @"http://google.com/";
NSURL *url = [NSURL URLWithString:fullURL];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[_viewWeb loadRequest:requestObj];
// Do any additional setup after loading the view, typically from a nib.
}
我该如何解决?
【问题讨论】:
-
你把_viewWeb当作UIView对象了吗???请检查一下我的朋友..你将不得不创建 UIWebview 的对象。
-
在第 15 步中,您应该确认 viewWeb 是 UIWebView 而不是 UIView
-
显示您的 _viewWeb 声明部分
标签: ios iphone objective-c uiview uiwebview