我是iOS的新手请帮助,当我第一次运行代码时,它在模拟器中成功运行以及正确的输出。现在对于相同的代码,它显示以下错误:
2015-10-09 11:25:30.569 ViewController [1417:44846] *终止应用 由于未捕获的异常'NSUnknownKeyException',原因: '[setValue:forUndefinedKey:]:this class不是密钥值编码兼容的key outlinebtn。 * 首先抛出调用堆栈:
(0 CoreFoundation 0x000000010c840f35 exceptionPreprocess + 165 1 libobjc.A.dylib 0x000000010c130bb7 objc_exception_throw + 45 2 CoreFoundation
类型的未捕获异常
0x000000010c840b79 - [NSException raise] + 9 3基础
0x000000010bccd7b3 - [NSObject(NSKeyValueCoding)setValue:forKey:] + 259 4 CoreFoundation 0x000000010c78ae80 - [NSArray makeObjectsPerformSelector:] + 224 5 UIKit 0x000000010cef2c7d - [UINib instantiateWithOwner:options:] + 1506 6
UIKit 0x000000010cd51f98 - [UIViewController _loadViewFromNibNamed:bundle:] + 242 7 UIKit 0x000000010cd52588 - [UIViewController loadView] + 109 8 UIKit
0x000000010cd527f9 - [UIViewController loadViewIfRequired] + 75 9
UIKit 0x000000010cd52c8e - [UIViewController视图] + 27 10 UIKit 0x000000010cc71ca9 - [UIWindow addRootViewControllerViewIfPossible] + 58 11 UIKit 0x000000010cc72041 - [UIWindow _setHidden:强制:] + 247 12 UIKit 0x000000010cc7e72c - [UIWindow makeKeyAndVisible] + 42 13 UIKit
0x000000010cc29061 - [UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 2628 14 UIKit 0x000000010cc2bd2c - [UIApplication _runWithMainScene:transitionContext:completion:] + 1350 15 UIKit 0x000000010cc2abf2 - [UIApplication workspaceDidEndTransaction:] + 179 16 FrontBoardServices 0x000000010f3e92a3 __31- [FBSSerialQueue performAsync:] _ block_invoke + 16 17 CoreFoundation 0x000000010c77653c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 12 18 CoreFoundation 0x000000010c76c285 __CFRunLoopDoBlocks + 341 19 CoreFoundation
0x000000010c76ba43 __CFRunLoopRun + 851 20 CoreFoundation
0x000000010c76b486 CFRunLoopRunSpecific + 470 21 UIKit
0x000000010cc2a669 - [UIApplication _run] + 413 22 UIKit
0x000000010cc2d420 UIApplicationMain + 1282 23 ViewController
0x000000010bc01e43 main + 115 24 libdyld.dylib
0x000000010edd0145 start + 1)libc ++ abi.dylib:终止于 NSException(lldb)
#import <UIKit/UIKit.h>
#import "AppDelegate.h"
int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}
怎么办?/请帮帮我。我是iOS的新手