Ios 接口生成器文件中的Xcode 6未知类

Ios 接口生成器文件中的Xcode 6未知类,ios,objective-c,xcode,Ios,Objective C,Xcode,当按钮链接到视图控制器时会出现错误。我非常想解决这个问题。我对Xcode也很陌生 我试过了,但没有一个奏效: 接口生成器文件Xcode中的未知类错误 Xcode 6奇怪的错误:干扰生成器文件中的未知类 接口生成器文件中的XCode未知类***** 错误是: 2015-04-19 15:17:32.565 *****[*******] Unknown class ******* in Interface Builder file. 2015-04-19 15:17:32.671 *****[*

当按钮链接到视图控制器时会出现错误。我非常想解决这个问题。我对Xcode也很陌生

我试过了,但没有一个奏效:

  • 接口生成器文件Xcode中的未知类错误
  • Xcode 6奇怪的错误:干扰生成器文件中的未知类
  • 接口生成器文件中的XCode未知类*****
错误是:

2015-04-19 15:17:32.565 *****[*******] Unknown class ******* in Interface Builder file.
2015-04-19 15:17:32.671 *****[********] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x7aecbd00> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key ********.'
*** First throw call stack:
(
0   CoreFoundation                      0x01ff7466 __exceptionPreprocess + 182
1   libobjc.A.dylib                     0x01c80a97 objc_exception_throw + 44
2   CoreFoundation                      0x01ff7081 -[NSException raise] + 17
3   Foundation                          0x0190380e -[NSObject(NSKeyValueCoding) setValue:forUndefinedKey:] + 282
4   Foundation                          0x0185f838 _NSSetUsingKeyValueSetter + 115
5   Foundation                          0x0185f7bd -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
6   Foundation                          0x018950a6 -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 386
7   UIKit                               0x0097e329 -[UIRuntimeOutletConnection connect] + 106
8   libobjc.A.dylib                     0x01c96724 -[NSObject performSelector:] + 62
9   CoreFoundation                      0x01f30dbc -[NSArray makeObjectsPerformSelector:] + 316
10  UIKit                               0x0097cdea -[UINib instantiateWithOwner:options:] + 1775
11  UIKit                               0x0079e2a4 -[UIViewController _loadViewFromNibNamed:bundle:] + 270
12  UIKit                               0x0079ea3b -[UIViewController loadView] + 295
13  UIKit                               0x0079ec6f -[UIViewController loadViewIfRequired] + 78
14  UIKit                               0x0079f215 -[UIViewController view] + 35
15  UIKit                               0x00e14ca7 -[_UIFullscreenPresentationController _setPresentedViewController:] + 75
16  UIKit                               0x00774551 -[UIPresentationController initWithPresentedViewController:presentingViewController:] + 113
17  UIKit                               0x007ac6e1 -[UIViewController _presentViewController:withAnimationController:completion:] + 2102
18  UIKit                               0x007af252 __62-[UIViewController presentViewController:animated:completion:]_block_invoke + 345
19  UIKit                               0x007af0a4 -[UIViewController presentViewController:animated:completion:] + 224
20  UIKit                               0x007af56a -[UIViewController presentModalViewController:animated:] + 57
21  UIKit                               0x00c786cd -[UIStoryboardModalSegue perform] + 271
22  UIKit                               0x00c65d89 -[UIStoryboardSegueTemplate _perform:] + 217
23  UIKit                               0x00c65e05 -[UIStoryboardSegueTemplate perform:] + 116
24  libobjc.A.dylib                     0x01c967cd -[NSObject performSelector:withObject:withObject:] + 84
25  UIKit                               0x00648340 -[UIApplication sendAction:to:from:forEvent:] + 99
26  UIKit                               0x006482d2 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 64
27  UIKit                               0x0077ca56 -[UIControl sendAction:to:forEvent:] + 69
28  UIKit                               0x0077ce73 -[UIControl _sendActionsForEvents:withEvent:] + 598
29  UIKit                               0x0077c0dd -[UIControl touchesEnded:withEvent:] + 660
30  UIKit                               0x00698ffa -[UIWindow _sendTouchesForEvent:] + 874
31  UIKit                               0x00699ad5 -[UIWindow sendEvent:] + 791
32  UIKit                               0x0065ebb1 -[UIApplication sendEvent:] + 242
33  UIKit                               0x0066ebf6 _UIApplicationHandleEventFromQueueEvent + 21066
34  UIKit                               0x00642bc7 _UIApplicationHandleEventQueue + 2300
35  CoreFoundation                      0x01f1a98f __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 15
36  CoreFoundation                      0x01f1049d __CFRunLoopDoSources0 + 253
37  CoreFoundation                      0x01f0f9f8 __CFRunLoopRun + 952
38  CoreFoundation                      0x01f0f37b CFRunLoopRunSpecific + 443
39  CoreFoundation                      0x01f0f1ab CFRunLoopRunInMode + 123
40  GraphicsServices                    0x039022c1 GSEventRunModal + 192
41  GraphicsServices                    0x039020fe GSEventRun + 104
42  UIKit                               0x006469b6 UIApplicationMain + 1526
43  Goals                               0x0006d0bd main + 141
44  libdyld.dylib                       0x0450bac9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 
2015-04-19 15:17:32.565******[*********]接口生成器文件中的未知类*******。
2015-04-19 15:17:32.671***[*********]***由于未捕获的异常“NSUnknownKeyException”而终止应用程序,原因:“[setValue:forUndefinedKey::]:此类不符合密钥*********”的键值编码。”
***第一次抛出调用堆栈:
(
0 CoreFoundation 0x01ff7466例外预处理+182
1 libobjc.A.dylib 0x01c80a97 objc_异常_抛出+44
2芯基础0x01ff7081-[N异常升高]+17
3基金会0x080380E-[NSbOuts](NSKEY ValueCudid)SETValu: FununDealdKe::+ 282
4基金会0x0185F838,NSSESEUSEKIKEVSETETER + 115
5基金会0x0185F7BD- [ NSObjices(NSKEY ValueCoDIN)SETValue:FordK::] + 267
6基金会0x018950A6- [ NSObjices(NSKEY ValueCudid)设置值:FrKePosie:] + 386
7 UIKit 0x0097e329-[UIRuntimeOutletConnection connect]+106
8 libobjc.A.dylib 0x01c96724-[NSObject性能选择器:][62
9 CoreFoundation 0x01f30dbc-[NSArray makeObjectsPerformSelector:+316
10 UIKit 0x0097cdea-[UINib实例化所有者:选项:][1775
11 UIKit 0x0079e2a4-[UIViewController\u LoadViewFromNibName:bundle:][270
12 UIKit 0x0079ea3b-[UIViewController loadView]+295
13 UIKit 0x0079ec6f-[UIViewController loadViewIfRequired]+78
14 UIKit 0x0079f215-[UIViewController视图]+35
15 UIKit 0x00e14ca7-[\u UIFullScreen PresentationController\u setPresentedViewController:][75
16 UIKit 0x00774551-[UIPresentationController初始化与PresentedViewController:presentingViewController:+113
17 UIKit 0x007ac6e1-[UIViewController\u presentViewController:With AnimationController:completion:+2102
18 UIKit 0x007af252 \uuuu 62-[UIViewController当前视图控制器:动画:完成:]\u块\u调用+345
19 UIKit 0x007af0a4-[UIViewController当前视图控制器:动画:完成:][224
20 UIKit 0x007af56a-[UIViewController presentModalViewController:动画:][57
21 UIKit 0x00c786cd-[UIStoryboardModalSegue执行]+271
22 UIKit 0x00c65d89-[UIStoryboardSegueTemplate]执行:+217
23 UIKit 0x00c65e05-[UIStoryboardSegueTemplate执行:][116
24 libobjc.A.dylib 0x01c967cd-[NSObject性能选择器:withObject:withObject:+84
25 UIKit 0x00648340-[UIApplication sendAction:to:from:forEvent:][99
26 UIKit 0x006482d2-[UIApplication sendAction:toTarget:fromSender:forEvent:][64
27 UIKit 0x0077ca56-[UIControl发送操作:发送到:forEvent:+69
28 UIKit 0x0077ce73-[UIControl\u发送操作预防:带事件:][598
29 UIKit 0x0077c0dd-[UIControl触摸附加:带事件:+660
30 UIKit 0x00698ffa-[UIWindow\u sendTouchesForEvent:+874
31 UIKit 0x00699ad5-[UIWindow sendEvent:+791
32 UIKit 0x0065ebb1-[UIApplication sendEvent:+242
33 UIKit 0x0066ebf6 _UIApplicationHandleEventFromQueueEvent+21066
34 UIKit 0x00642bc7 _UIApplicationHandleEventQueue+2300
35 CoreFoundation 0x01f1a98f\uuuu CFRUNLOOP\u正在调用\uu OUT\uu以执行\uu功能\uuuu+15
36 CoreFoundation 0x01f1049d\uu CFRunLoopDoSources0+253
37 CoreFoundation 0x01f0f9f8 _ucfrunlooprun+952
38 CoreFoundation 0x01f0f37b CFRunLoopRunSpecific+443
39 CoreFoundation 0x01f0f1ab CFRUNLOOPSRUNINMODE+123
40图形服务0x039022c1 GSEventRunModal+192
41图形服务0x039020fe GSEventRun+104
42 UIKit 0x006469b6 UIApplicationMain+1526
43目标0x0006d0bd主+141
44 libdyld.dylib 0x0450bac9开始+1
)
libc++abi.dylib:以NSException类型的未捕获异常终止
(lldb)

1.
接口生成器文件Xcode error中的未知类
表示
序列图像板中的
视图控制器
未知类
链接。仔细检查一下

2.阅读错误报告后,
原因:'[setValue:forUndefinedKey::]:该类不符合密钥的键值编码要求
。但由于缺乏具体的代码,我只能向您推荐一些“解决方案”

我将编写一个storeData函数作为示例。而
objectA
是DataObject类的实例变量

func storeData() { 
let defaults = NSUserDefaults.standardUserDefaults()
var data = NSKeyedArchiver.archivedDataWithRootObject(objectA) 
defaults.setValue(data, forUndefinedKey: "DataBase") // The error occur in there
} 
  • 查看
    数据
    ,它是
    对象a
    的压缩。而
    对象a
    继承自
    ,该类在
    中提到,该类不符合键
    的键值编码