Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
线程1信号:SIGABRT错误IOS 7_Ios_Iphone_Objective C_Xcode - Fatal编程技术网

线程1信号:SIGABRT错误IOS 7

线程1信号:SIGABRT错误IOS 7,ios,iphone,objective-c,xcode,Ios,Iphone,Objective C,Xcode,我最近将我创建的一个应用程序从iOS 6升级到iOS 7(以及从Xcode 4升级到Xcode 5)。然后,我尝试运行该应用程序,构建表示成功,但该应用程序崩溃并将我指向以下代码和错误消息: int retVal = UIApplicationMain(argc, argv, nil, nil); 线程1信号:SIGABRT 控制台日志如下所示,以备参考: 2014-01-14 14:30:39.791 Recipes[1808:70b] *** Terminating app due to

我最近将我创建的一个应用程序从iOS 6升级到iOS 7(以及从Xcode 4升级到Xcode 5)。然后,我尝试运行该应用程序,构建表示成功,但该应用程序崩溃并将我指向以下代码和错误消息:

int retVal = UIApplicationMain(argc, argv, nil, nil);
线程1信号:SIGABRT

控制台日志如下所示,以备参考:

2014-01-14 14:30:39.791 Recipes[1808:70b] *** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time! View <UIImageView: 0x8ba3e80; frame = (0 0; 320 568); autoresize = W+H; userInteractionEnabled = NO; layer = <CALayer: 0x8ba3f10>> is associated with <UIViewController: 0x8b93c60>. Clear this association before associating this view with <UIViewController: 0x8b95690>.'
*** First throw call stack:
(
    0   CoreFoundation                      0x01ab45e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib                     0x018378b6 objc_exception_throw + 44
    2   CoreFoundation                      0x01ab43bb +[NSException raise:format:] + 139
    3   UIKit                               0x00a31c99 -[UIView(Internal) _setViewDelegate:] + 242
    4   UIKit                               0x00ae3ecc +[UIViewController setViewController:forView:] + 40
    5   UIKit                               0x00ade921 -[UIViewController setView:] + 511
    6   Foundation                          0x005e6d28 _NSSetUsingKeyValueSetter + 133
    7   Foundation                          0x005e6253 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 267
    8   Foundation                          0x0064870a -[NSObject(NSKeyValueCoding) setValue:forKeyPath:] + 412
    9   UIKit                               0x00c6ca15 -[UIRuntimeOutletConnection connect] + 106
    10  libobjc.A.dylib                     0x018497d2 -[NSObject performSelector:] + 62
    11  CoreFoundation                      0x01aafb6a -[NSArray makeObjectsPerformSelector:] + 314
    12  UIKit                               0x00c6b56e -[UINib instantiateWithOwner:options:] + 1417
    13  UIKit                               0x00c6d2fb -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 165
    14  UIKit                               0x009ca3bb -[UIApplication _loadMainNibFileNamed:bundle:] + 58
    15  UIKit                               0x009ca6e9 -[UIApplication _loadMainInterfaceFile] + 245
    16  UIKit                               0x009c928f -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 543
    17  UIKit                               0x009dd87c -[UIApplication handleEvent:withNewEvent:] + 3447
    18  UIKit                               0x009ddde9 -[UIApplication sendEvent:] + 85
    19  UIKit                               0x009cb025 _UIApplicationHandleEvent + 736
    20  GraphicsServices                    0x02ea62f6 _PurpleEventCallback + 776
    21  GraphicsServices                    0x02ea5e01 PurpleEventCallback + 46
    22  CoreFoundation                      0x01a2fd65 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
    23  CoreFoundation                      0x01a2fa9b __CFRunLoopDoSource1 + 523
    24  CoreFoundation                      0x01a5a77c __CFRunLoopRun + 2156
    25  CoreFoundation                      0x01a59ac3 CFRunLoopRunSpecific + 467
    26  CoreFoundation                      0x01a598db CFRunLoopRunInMode + 123
    27  UIKit                               0x009c8add -[UIApplication _run] + 840
    28  UIKit                               0x009cad3b UIApplicationMain + 1225
    29  Recipes                             0x000022cf main + 93
    30  libdyld.dylib                       0x02b4670d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 
2014-01-14 14:30:39.791配方[1808:70b]***由于未捕获的异常“UIViewControllerHierarchyConsistency”而终止应用程序,原因是:“一个视图一次最多只能与一个视图控制器关联!视图与关联。在将此视图与关联之前,请清除此关联。'
***第一次抛出调用堆栈:
(
0 CoreFoundation 0x01ab45e4例外预处理+180
1 libobjc.A.dylib 0x018378b6 objc_异常_抛出+44
2 CoreFoundation 0x01ab43bb+[N异常提升:格式:][139
3 UIKit 0x00a31c99-[UIView(内部)\u setViewDelegate:+242
4 UIKit 0x00ae3ecc+[UIViewController setViewController:forView:+40
5 UIKit 0x00ade921-[UIViewController setView:+511
6基金会0x05E6D28、NSSESEUSEKEY值ESETER + 133
7基金会0x05E6253- [ NSObjices(NSKEY ValueCoDIN)设置值:FrKEY:] + 267
8基金会0x06870A--[ NSObjices(NSKEY ValueCoDIN)设置值:FrKePosie:] + 412
9 UIKit 0x00c6ca15-[UIRuntimeOutletConnection connect]+106
10 libobjc.A.dylib 0x018497d2-[NSObject性能选择器:][62
11 CoreFoundation 0x01aafb6a-[NSArray makeObjectsPerformSelector:][314
12 UIKit 0x00c6b56e-[UINib实例化所有者:选项:][1417
13 UIKit 0x00c6d2fb-[NSBundle(UINSBUNDLEADTIONS)LOADNIBNAME:owner:options:+165
14 UIKit 0x009ca3bb-[UIApplication\u LoadMainNibFileName:bundle:][58
15 UIKit 0x009ca6e9-[UIApplication\u LoadMain InterfaceFile]+245
16 UIKit 0x009c928f-[UIApplication\u运行时URL:payload:launchOrientation:statusBarStyle:statusBarHidden:+543
17 UIKit 0x009dd87c-[UIApplication handleEvent:withNewEvent:][3447
18 UIKit 0x009ddde9-[UIApplication sendEvent:+85
19 UIKit 0x009cb025 _UIApplicationHandleEvent+736
20图形服务0x02ea62f6 _PurpleEventCallback+776
21图形服务0x02ea5e01 PurpleEventCallback+46
22 CoreFoundation 0x01a2fd65\uuuuCFrunloop\u正在调用\uuuOUT\uOUT\uOUT\uOU到\uOU A\uOU SOURCE1\uOU执行\uOU功能\uuOU+53
23 CoreFoundation 0x01a2fa9b\uu CFRunLoopDoSource1+523
24 CoreFoundation 0x01a5a77c\uuu CFRunLoopRun+2156
25 CoreFoundation 0x01a59ac3 CFRunLoopRunSpecific+467
26 CoreFoundation 0x01a598db CFRUNLOOPSRUNINMODE+123
27 UIKit 0x009c8add-[UIU应用程序运行]+840
28 UIKit 0x009cad3b UIApplicationMain+1225
29份配方0x000022cf主配方+93
30 libdyld.dylib 0x02b4670d开始+1
)
libc++abi.dylib:以NSException类型的未捕获异常终止
(lldb)

非常感谢您的帮助。谢谢

第一行是告诉你到底是什么问题。如果没有任何代码,就不可能为您提供更多的帮助。您将同时向两个不同的ViewController添加UIImageView。它在第一行提到了哪一个和哪一个ViewController。