我剛開始學習可可程序設計。我試圖建立一個簡單的圖像查看器。我創建了一個新項目,然後從對象庫中添加了一個圖像查看器。問題是,我收到了一個我甚至無法通過Google搜索找到的錯誤。許多對象庫不工作
2012-04-21 20:36:20.620 ImageViewer[2095:403] An uncaught exception was raised
2012-04-21 20:36:20.621 ImageViewer[2095:403] *** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (IKImageView)
2012-04-21 20:36:20.624 ImageViewer[2095:403] (
0 CoreFoundation 0x00007fff83a42fc6 __exceptionPreprocess + 198
1 libobjc.A.dylib 0x00007fff89dd3d5e objc_exception_throw + 43
2 CoreFoundation 0x00007fff83a42dfa +[NSException raise:format:arguments:] + 106
3 CoreFoundation 0x00007fff83a42d84 +[NSException raise:format:] + 116
4 Foundation 0x00007fff8b957729 _decodeObjectBinary + 2714
5 Foundation 0x00007fff8b95899a -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1193
6 Foundation 0x00007fff8b92f480 -[NSArray(NSArray) initWithCoder:] + 486
7 Foundation 0x00007fff8b9577bb _decodeObjectBinary + 2860
8 Foundation 0x00007fff8b956ad6 _decodeObject + 201
9 AppKit 0x00007fff8eceac18 -[NSView initWithCoder:] + 1051
10 Foundation 0x00007fff8b9577bb _decodeObjectBinary + 2860
11 Foundation 0x00007fff8b956ad6 _decodeObject + 201
12 AppKit 0x00007fff8eddc106 -[NSWindowTemplate initWithCoder:] + 3998
13 Foundation 0x00007fff8b9577bb _decodeObjectBinary + 2860
14 Foundation 0x00007fff8b95899a -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1193
15 Foundation 0x00007fff8b95839b -[NSSet(NSSet) initWithCoder:] + 519
16 Foundation 0x00007fff8b9577bb _decodeObjectBinary + 2860
17 Foundation 0x00007fff8b956ad6 _decodeObject + 201
18 AppKit 0x00007fff8ebed99d -[NSIBObjectData initWithCoder:] + 2099
19 Foundation 0x00007fff8b9577bb _decodeObjectBinary + 2860
20 Foundation 0x00007fff8b956ad6 _decodeObject + 201
21 AppKit 0x00007fff8ebed048 loadNib + 235
22 AppKit 0x00007fff8ebec59c +[NSBundle(NSNibLoading) _loadNibFile:nameTable:withZone:ownerBundle:] + 217
23 AppKit 0x00007fff8ebec4b7 +[NSBundle(NSNibLoading) loadNibFile:externalNameTable:withZone:] + 141
24 AppKit 0x00007fff8ebec3fa +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 364
25 AppKit 0x00007fff8ee5f9b3 NSApplicationMain + 398
26 ImageViewer 0x00000001087035a2 main + 34
27 ImageViewer 0x0000000108703574 start + 52
28 ??? 0x0000000000000003 0x0 + 3
)
它看起來像..我需要鏈接一個框架,但可可框架已經鏈接。
我還需要檢查其他東西嗎?
謝謝你的回答。自他稍早發佈之後,我不得不選擇Caleb的答案。 – Moon 2012-04-22 03:57:37
不幸的是,我不認爲他的回答是正確的。沒有ImageKit.framework可以添加到您的項目中,因爲它嵌入了Quartz.framework內部,這是您必須添加的框架。 – mttrb 2012-04-22 03:58:36
//你說得對。剛剛確認沒有ImageKit框架..回覆。謝謝! – Moon 2012-04-22 03:59:31