gpt4 book ai didi

xcode - 许多对象库不起作用

转载 作者:行者123 更新时间:2023-12-03 17:30:22 24 4
gpt4 key购买 nike

我刚刚开始学习 cocoa 编程。我尝试构建一个简单的图像查看器。我创建了一个新项目,然后从对象库添加了一个图像查看器。问题是我收到了一个错误,我什至无法通过谷歌搜索找到它。

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
)

看起来..我需要链接一个框架,但cocoa框架已经链接了。

还有其他我需要检查的事情吗?

最佳答案

堆栈跟踪提示缺少 IKImageView 类,该类是 ImageKit 的一部分,而 ImageKit 又是 Quartz 框架的一部分。

您需要将 Quartz.framework 添加到项目中。

关于xcode - 许多对象库不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10265027/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com