【发布时间】:2015-02-15 01:00:53
【问题描述】:
我正在使用 Storyboards,当我触发 segue 时,出现一些错误:Uncaught Exception:
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<CommercerApp.ProductDetailController 0x78ff1030> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key contentView.'
*** First throw call stack:
(
0 CoreFoundation 0x00c9f946 _exceptionPreprocess + 182
1 libobjc.A.dylib 0x00928a97 objc_exception_throw + 44
2 CoreFoundation 0x00c9f561 -[NSException raise] + 17
3 Foundation 0x005b010e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4 Foundation 0x0050c138 _NSSetUsingKeyValueSetter + 115
5 Foundation 0x0050c0bd -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6 Foundation 0x005419a6 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 386
7 UIKit 0x01639649 -[UIRuntimeOutletConnection connect] + 106
8 libobjc.A.dylib 0x0093e724 -[NSObject performSelector:] + 62
9 CoreFoundation 0x00bd95dc -[NSArray makeObjectsPerformSelector:] + 316
10 UIKit 0x0163810a -[UINib instantiateWithOwner:options:] + 1775
11 UIKit 0x0145a624 -[UIViewController _loadViewFromNibNamed:bundle:] + 270
12 UIKit 0x0145adbb -[UIViewController loadView] + 295
13 UIKit 0x0145afef -[UIViewController loadViewIfRequired] + 78
14 UIKit 0x0145b595 -[UIViewController view] + 35
15 UIKit 0x0149c534 -[UINavigationController preferredContentSize] + 161
16 UIKit 0x0143644d -[UIPresentationController preferredContentSizeDidChangeForChildContentContainer:] + 122
17 UIKit 0x01433922 _56-[UIPresentationController runTransitionForCurrentState]_block_invoke + 156
18 UIKit 0x014677ab _40+[UIViewController _scheduleTransition:]_block_invoke + 18
19 UIKit 0x0132d0ce __afterCACommitHandler_block_invoke + 15
20 UIKit 0x0132d079 _applyBlockToCFArrayCopiedToStack + 415
21 UIKit 0x0132ce8e _afterCACommitHandler + 545
22 CoreFoundation 0x00bc29de _CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
23 CoreFoundation 0x00bc2920 _CFRunLoopDoObservers + 400
24 CoreFoundation 0x00bb835a _CFRunLoopRun + 1226
25 CoreFoundation 0x00bb7bcb CFRunLoopRunSpecific + 443
26 CoreFoundation 0x00bb79fb CFRunLoopRunInMode + 123
27 GraphicsServices 0x0526024f GSEventRunModal + 192
28 GraphicsServices 0x0526008c GSEventRun + 104
29 UIKit 0x013038b6 UIApplicationMain + 1526
30 CommercerApp 0x0012dbce top_level_code + 78
31 CommercerApp 0x0012dc0b main + 43
32 libdyld.dylib 0x02b24ac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
我的故事板是这样的:(当我从左到右打开 4th-->5th segue 时出现异常)
如果你有什么想法,请帮我解决。
【问题讨论】:
标签: ios swift storyboard segue uncaught-exception