XIB未删除连线

016-02-24 18:00:29.200 LoginAndRegister[6955:277483] Failed to set (keyPath) user defined inspected property on (UIView): [<UIView 0x7f872b636570> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key keyPath.
2016-02-24 18:00:29.200 LoginAndRegister[6955:277483] Failed to set (keyPath) user defined inspected property on (UIView): [<UIView 0x7f872b636570> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key keyPath.
2016-02-24 18:00:29.204 LoginAndRegister[6955:277483] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<ViewController 0x7f872b629910> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key HeadImageView.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000108d15f45 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000108404deb objc_exception_throw + 48
2 CoreFoundation 0x0000000108d15b89 -[NSException raise] + 9
3 Foundation 0x0000000107fd0a6b -[NSObject(NSKeyValueCoding) setValue:forKey:] + 288
4 UIKit 0x000000010924e04c -[UIViewController setValue:forKey:] + 88
5 UIKit 0x000000010947ba71 -[UIRuntimeOutletConnection connect] + 109
6 CoreFoundation 0x0000000108c56a80 -[NSArray makeObjectsPerformSelector:] + 224
7 UIKit 0x000000010947a454 -[UINib instantiateWithOwner:options:] + 1864
8 UIKit 0x0000000109254c16 -[UIViewController _loadViewFromNibNamed:bundle:] + 381
9 UIKit 0x0000000109255542 -[UIViewController loadView] + 178
10 UIKit 0x00000001092558a0 -[UIViewController loadViewIfRequired] + 138
11 UIKit 0x0000000109256013 -[UIViewController view] + 27
12 UIKit 0x000000010912f51c -[UIWindow addRootViewControllerViewIfPossible] + 61
13 UIKit 0x000000010913038b -[UIWindow setRootViewController:] + 1144
14 LoginAndRegister 0x0000000107f02b4d -[AppDelegate application:didFinishLaunchingWithOptions:] + 621
15 UIKit 0x00000001090b9f24 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 272
16 UIKit 0x00000001090bb0ca -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3415
17 UIKit 0x00000001090c19c3 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1750
18 UIKit 0x00000001090beba3 -[UIApplication workspaceDidEndTransaction:] + 188
19 FrontBoardServices 0x000000010bac1784 -[FBSSerialQueue _performNext] + 192
20 FrontBoardServices 0x000000010bac1af2 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
21 CoreFoundation 0x0000000108c42011 CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
22 CoreFoundation 0x0000000108c37f3c __CFRunLoopDoSources0 + 556
23 CoreFoundation 0x0000000108c373f3 __CFRunLoopRun + 867
24 CoreFoundation 0x0000000108c36e08 CFRunLoopRunSpecific + 488
25 UIKit 0x00000001090be4f5 -[UIApplication _run] + 402
26 UIKit 0x00000001090c330d UIApplicationMain + 171
27 LoginAndRegister 0x0000000107f036ef main + 111
28 libdyld.dylib 0x000000010b45192d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

要检查这一问题,可以从两个方面入手。
第一种出错的原因可能是错误的IBOutlet连接,即xib中定义了某个IBOutlet,但是在对应的头文件中,该IBOutlet已经被修改或删除。要检查这一问题,可以打开xib文件,在File's Owner上点击右键,然后在弹出的窗口中检查是否有“惊叹号”提示的IBOutlet连接,基本上可以找到问题所在。
第二种出错的原因可能是在xib文件中没有正确指定对象的类。要检查这一问题,可以打开xib文件,查看自定义视图控制器或者视图的Custom Class是否定义正确即可。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 转自http://www.raywenderlich.com/zh-hans/30818/ios应用崩溃日志揭秘 ...
    RunSnails阅读 9,940评论 2 22
  • 异常编码 在研究真实闪退场景之前,还有一点需要重点介绍一下:就是那些有趣的异常编码 。 你可以在报告的异常部分——...
    中二修行者阅读 5,955评论 0 3
  • 1、禁止手机睡眠[UIApplication sharedApplication].idleTimerDisabl...
    DingGa阅读 4,816评论 1 6
  • 愿我早日攒够失望 文/三方草 晚餐后,一个人,出门走走。不知不觉,走到市中心最繁华的街道上,人来人往,突然想起刘媛...
    三方草Lynn阅读 1,661评论 0 1
  • 《自卑与超越》阿德勒的这本书老师很早以前就推荐了,我一直没有看,昨天感觉好久没有看书了,就看了起来,结果一下子...
    阳光洒洒阅读 3,408评论 0 1

友情链接更多精彩内容