以NSException类型的未捕获异常终止?

问题描述:

当点击一个按钮以继续进入新视图时,我的应用程序崩溃。这出现:以NSException类型的未捕获异常终止?

int main(int argc, char * argv[]) 
{ 
    @autoreleasepool { 
     return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 
    } 
} 

“返回UIApplicationMain ......”在绿色的亮点是“主题1:信号SIGABRT”结尾。 错误还包括这样的输出:

**Terminating app due to uncaught exception *** 'NSUnknownKeyException reason:'[<SlopeViewController 0x8b68c70> setValue:forUndefinedKey:]: this class is not key value  coding-compliant for the key m.' *** First throw call stack: (0x16b19b8 0x14328b6 0x17407c1 0x10f00ee 0x105c7db 0x105bd33 0x10be069 0x4b579b 0x14447d2 0x16acf5a 0x4b42f4 0x336e79 0x337491 0x337792 0x337c98 0x345912 0x345c5a 0x5aca79 0x34279a 0x3429a0 0x3429e0 0x73dd2b 0x72e181 0x72e1fc 0x1444874 0x2343b7 0x234343 0x32027e 0x320641 0x31f8fd 0x26fa0d 0x270266 0x245076 0x232efb 0x2ee332b 0x162d48d 0x162d3e5 0x162d11b 0x1657b30 0x165710d 0x1656f3b 0x35f5ff2 0x35f5e19 0x2304eb 0x6fd3 0x1d1370d 0x1) 
libc++abi.dylib: terminating with uncaught exception of type NSException 
(lldb 

我不知道该怎么做。请帮忙!

+0

你需要给我们更多的信息 - 对于很多客观错误的出现-C! – jburns20

+0

这并不完全是这样,如果你非常聪明并且检查了调用堆栈,则可以找到实际的代码。 – tbodt

+0

请参阅以下搜索结果本期:http://*.com/search?q=this+class+is+not+key+value+coding-compliant+for+the+key – rmaddy

为了防止NSException崩溃,您应该点击交叉(X),以去掉黄三角:

enter image description here

+0

谢谢....我的解决了这个错误.. –

+1

整洁,我怎么找到哪个视图控制器来检查? – user83039

+0

您可以将断点放到项目中的每个initWithNibName和viewDidLoad视图控制器 – stosha