我是一個非常熟練的程序員,所以請裸照我。Xcode-獲取錯誤(斷點)「線程1:信號SIGBRT」
在嘗試許多不同的功能,如UITableView
和mapview
有註釋運行我tab-bar app
,我最近我的第一個選項卡上,我firstviewcontroller
增加了webview
。據我所知,這裏的編碼沒有問題,儘管自從我嘗試在我的第一個標籤上添加webview時,我一直在嘗試運行應用程序時獲得breakpoint/error
:Thread 1: signal SIGBRT.
我已經閱讀了一些,有人說如果我將mi xib文件/ storyboard的部署更改爲iOS 5.0而不是6.0(我目前正在使用),並且沒有檢查"Use Autolayout"
,應該將其刪除。雖然它沒有。任何想法或解決方案?
下面是我的firstviewcontroller.h編碼
#import <UIKit/UIKit.h>
@interface FirstViewController : UIViewController
@property (weak, nonatomic) IBOutlet UIWebView *webView;
@end
firstviewcontroller.m
#import "FirstViewController.h"
@interface FirstViewController()
@end
@implementation FirstViewController
@synthesize webView;
- (void)viewDidLoad
{
NSString *website = @"http://www.google.com";
NSURL *url = [NSURL URLWithString:website];
NSURLRequest *requestUrl = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestUrl];
[super viewDidLoad];
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}
@end
的main.m:
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char *argv[])
{
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); // <--- HERE's where it says SIGBRT
}
}
所有輸出:
2013-01-04 11:27:06.697 My Corp[784:13d03] Unknown class ViewController in Interface Builder file.
2013-01-04 11:27:06.716 My Corp[784:13d03] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<FirstViewController 0x808fbf0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key myWebView.'
*** First throw call stack:
(0x1800012 0x11c5e7e 0x1888fb1 0xc72711 0xbf3ec8 0xbf39b7 0xc1e428 0x32a0cc 0x11d9663 0x17fb45a 0x328bcf 0x1ede37 0x1ee418 0x1ee648 0x1ee882 0x20fed9 0x20fd14 0x20e1ea 0x20e06c 0x20c1cc 0x20c9b6 0x1f0753 0x1f0a7b 0x1f1964 0x154877 0x15b5a3 0x153eed 0x13db56 0x13ddbf 0x13df55 0x146f67 0x10afcc 0x10bfab 0x11d315 0x11e24b 0x10fcf8 0x1cc9df9 0x1cc9ad0 0x1775bf5 0x1775962 0x17a6bb6 0x17a5f44 0x17a5e1b 0x10b7da 0x10d65c 0x289d 0x27c5)
libc++abi.dylib: terminate called throwing an exception
(lldb)
您可以發佈崩潰報告,以及您的應用程序崩潰的哪個點。看到代碼我沒有發現任何錯誤在這裏。 – Sumanth
是的!抱歉!我真笨!我會編輯這個問題! –
想我已經添加了你需要知道的內容嗎? –