iPhone模拟器继续无法加载带有错误sigabrt的网页
我正在从头开始构建一个web浏览器,除了最重要的东西外,几乎所有东西都能正常工作。浏览器会出现错误sigabrt,虽然我对iPhone编程还不熟悉,但我很确定这意味着我没有正确发送URL 这是通过按下按钮加载网页的代码iPhone模拟器继续无法加载带有错误sigabrt的网页,iphone,browser,sigabrt,Iphone,Browser,Sigabrt,我正在从头开始构建一个web浏览器,除了最重要的东西外,几乎所有东西都能正常工作。浏览器会出现错误sigabrt,虽然我对iPhone编程还不熟悉,但我很确定这意味着我没有正确发送URL 这是通过按下按钮加载网页的代码 - (IBAction)getURLButton:(NSString *)aString { NSURL *URL = [NSURL URLWithString:aString]; NSURLRequest *URLRequest = [NSURLRequest requestW
- (IBAction)getURLButton:(NSString *)aString {
NSURL *URL = [NSURL URLWithString:aString];
NSURLRequest *URLRequest = [NSURLRequest requestWithURL:URL];
BOOL load = [addressBar webView: (goButton) shouldStartLoadWithRequest:URLRequest navigationType:UIWebViewNavigationTypeFormSubmitted];
if (load) {
error = nil;
[goButton loadRequest:URLRequest];
//currentURLString = [UIWebView stringByEvaluatingJavaScriptFromString:@"document.location.href"];
//It's not in Xcode? It continues to get an error after I write the above statement.
} else {
NSString *message = NSURLErrorFailingURLErrorKey;
NSLog(@"%@",message);
}
}
这是错误消息:
2013-02-14 16:49:28.724 WebBrowser[1265:c07] -[ViewController getURL:]: unrecognized selector sent to instance 0x716f1d0
2013-02-14 16:49:28.727 WebBrowser[1265:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ViewController getURL:]: unrecognized selector sent to instance 0x716f1d0'
我知道哪里有错误,只是不知道在哪里。帮忙
2013-02-14 16:49:28.724 WebBrowser[1265:c07] -[ViewController getURL:]: unrecognized selector sent to instance 0x716f1d0
2013-02-14 16:49:28.727 WebBrowser[1265:c07] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[ViewController getURL:]: unrecognized selector sent to instance 0x716f1d0'
如果看到异常,则调用getURL:其中方法名为getURLButton: