Objective-C,通常写作ObjC或OC和较少用的Objective C或Obj-C,是扩充C的面向对象编程语言。它主要使用于Mac OS X和GNUstep这两个使用OpenStep标准的系统,而在NeXTSTEP和OpenStep中它更是基本语言。GCC与Clang含Objective-C的编译器,Objective-C可以在GCC以及Clang运作的系统上编译。
异常报错 'NSUnknownKeyException',具体日志如下:
异常一:
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<MainTableViewController 0xae26040> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key messageImage1.'
异常二:
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[MainTableViewController gotoThat:]: unrecognized selector sent to instance 0xb91feb0'
解决方式:
原因是 lib 组件关联 IBOutlet 时又关联file's ower 组件,解决办法将lib 组件直接对应 class 文件。