Iphone 从应用程序中删除选项卡栏后面临异常

Iphone 从应用程序中删除选项卡栏后面临异常,iphone,ios4,Iphone,Ios4,我在我的应用程序中添加了uitabarcontroller,但过了一段时间后删除了它。在添加UITabBarController之前,应用程序运行良好,但当我从应用程序中删除它时,我开始面临以下异常 Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<XpensesAppDelegate 0x4daaa40> setValue:forUndefinedKey:]: this cla

我在我的应用程序中添加了uitabarcontroller,但过了一段时间后删除了它。在添加UITabBarController之前,应用程序运行良好,但当我从应用程序中删除它时,我开始面临以下异常

Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<XpensesAppDelegate 0x4daaa40> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key tabBarController.'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x00fa45a9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x010f8313 objc_exception_throw + 44
    2   CoreFoundation                      0x00fa44e1 -[NSException raise] + 17
    3   Foundation                          0x00035677 _NSSetUsingKeyValueSetter + 135
    4   Foundation                          0x000355e5 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285
    5   UIKit                               0x004b930c -[UIRuntimeOutletConnection connect] + 112
    6   CoreFoundation                      0x00f1a8cf -[NSArray makeObjectsPerformSelector:] + 239
    7   UIKit                               0x004b7d23 -[UINib instantiateWithOwner:options:] + 1041
    8   UIKit                               0x004b9ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168
    9   UIKit                               0x002bf17a -[UIApplication _loadMainNibFile] + 172
    10  UIKit                               0x002bfcf4 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 291
    11  UIKit                               0x002ca617 -[UIApplication handleEvent:withNewEvent:] + 1533
    12  UIKit                               0x002c2abf -[UIApplication sendEvent:] + 71
    13  UIKit                               0x002c7f2e _UIApplicationHandleEvent + 7576
    14  GraphicsServices                    0x018fc992 PurpleEventCallback + 1550
    15  CoreFoundation                      0x00f85944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52
    16  CoreFoundation                      0x00ee5cf7 __CFRunLoopDoSource1 + 215
    17  CoreFoundation                      0x00ee2f83 __CFRunLoopRun + 979
    18  CoreFoundation                      0x00ee2840 CFRunLoopRunSpecific + 208
    19  CoreFoundation                      0x00ee2761 CFRunLoopRunInMode + 97
    20  UIKit                               0x002bf7d2 -[UIApplication _run] + 623
    21  UIKit                               0x002cbc93 UIApplicationMain + 1160
    22  Xpenses                             0x00001ad9 main + 121
    23  Xpenses                             0x00001a55 start + 53
    24  ???                                 0x00000001 0x0 + 1
)
terminate called throwing an exceptionsharedlibrary apply-load-rules all
由于未捕获的异常“NSUnknownKeyException”而终止应用程序,原因:“[setValue:forUndefinedKey:]:此类不符合key tabBarController的键值编码。”
***第一次抛出时调用堆栈:
(
0 CoreFoundation 0x00fa45a9例外预处理+185
1 libobjc.A.dylib 0x010f8313 objc_异常_抛出+44
2芯基础0x00fa44e1-[N异常升高]+17
3基金会0x000 03567 7
4基金会0x000 0355E5- [ NSObjices(NSKEY ValueCoDIN)SETValue:FordK::] + 285
5 UIKit 0x004b930c-[UIRuntimeOutletConnection connect]+112
6 CoreFoundation 0x00f1a8cf-[NSArray makeObjectsPerformSelector:+239
7 UIKit 0x004b7d23-[UINib实例化所有者:选项:][1041
8 UIKit 0x004b9ab7-[NSBundle(UINSBUNDLEADTIONS)LOADNIBNAME:所有者:选项:][168
9 UIKit 0x002bf17a-[UIApplication\u loadMainNibFile]+172
10 UIKit 0x002bfcf4-[UIApplication\u运行时URL:payload:launchOrientation:statusBarStyle:statusBarHidden:+291
11 UIKit 0x002ca617-[UIApplication handleEvent:withNewEvent:][1533
12 UIKit 0x002CBF-[UIApplication sendEvent:+71
13 UIKit 0x002c7f2e _UIApplicationHandleEvent+7576
14图形服务0x018fc992 PurpleEventCallback+1550
15 CoreFoundation 0x00f85944\uuuuCFRUNLOOP\u正在调用\uuU OUT\uU到\uU A\uU源1\uU执行\uU功能\uuu52
16 CoreFoundation 0x00ee5cf7\uu CFRunLoopDoSource1+215
17 CoreFoundation 0x00ee2f83\uuu CFRunLoopRun+979
18 CoreFoundation 0x00ee2840 CFRunLoopRunSpecific+208
19 CoreFoundation 0x00ee2761 CFRUNLOOPSRUNINMODE+97
20 UIKit 0x002bf7d2-[UIU应用程序运行]+623
21 UIKit 0x002cbc93 UIApplicationMain+1160
22 XPENSE 0x00001ad9主+121
23 XPENSE 0x00001a55启动+53
24°?0x00000001 0x0+1
)
终止调用引发exceptionsharedlibrary应用加载规则所有

是否有任何解决方案可以消除此异常?

您在Interface Builder中的应用程序代理的
tabBarController
出口连接了一些东西。但是,该出口已不存在,因此您将遇到此错误。您应该找到并删除该连接。

谢谢您的回答。我已经删除了tabBarController插座和与app delegate的连接,但仍然面临相同的问题。应用程序代理连接检查器状态如下。应用程序代理连接检查器状态如下。[出口]窗户---窗户。[引用出口]委托---文件所有者。除了这两个,没有连接。好吧,如果你遇到同样的错误,我不得不说我不相信你:):),但这就像痛苦的现实。你还有其他建议吗?或者我应该从头开始我的应用程序?也许可以尝试清理你的项目(⇧⌘K) 并重建它。