我不知道爲什麼我在執行pushViewController時出現SIGABRT錯誤。我將mpCustomFoodController作爲IBOUTLET,並在我的nib文件中有一個viewController,並且有一個文件正在等待接收此消息,但隨後每次都會在此調用中失敗。使用pushViewController時出現SIGABRT錯誤
-(IBAction)createNewCustomFood:(id)sender{
[self cancelButtonColorChange:sender];
self.title = @"Cancel";
mpCustomFoodController = [[MPCustomFood alloc]initWithNibName:@"MPCustomFood" bundle:nil];
//this is where the error occurs once is calls this
[self.navigationController pushViewController:mpCustomFoodController animated:YES];
//this will be calling the new view
}
我們需要更多信息。 SIGABRT不只是發生,總會有一個與崩潰伴隨的異常消息。至少在調試器中運行一個'bt',這樣你就可以看到導致錯誤的堆棧跟蹤。如果我不得不猜測,我會說你要麼沒有使用正確的筆尖名稱,要麼你的文件的所有者對象有一個不存在的插座被分配給。 – warrenm
#0 0x9a460c5a在__kill() #1 0x9a460c4c在殺$ UNIX2003() #2 0x9a4f35a5在加註() #在中止3 0x9a5096e4() #4 0x9a485b1b在_Unwind_Resume() #5 0x0121ae39在CFRunLoopRunSpecific() #6 0x0121accb在CFRunLoopRunInMode() #7 0x021d0879在GSEventRunModal() #8 0x021d093e在GSEventRun() #9 0x00586a9b在UIApplicationMain()在/用戶 #10 0x00001c5d在主(的argc = 1,的argv = 0xbfffece4) /rcrowell88/Desktop/VitabotApp/main.m:15 #11 0x00001bd5 in start() 當前語言:auto;目前objective-c – Rob
除了線程1:程序接收到的信號:「SIGABRT」 – Rob