iOS 9 push segue导致我的应用程序崩溃

iOS 9 push segue导致我的应用程序崩溃,第1张

概述在iOS 8.4,模拟器和手机中,我的performSegue调用没有遇到任何问题,但是当在 Xcode 7 beta 5上使用模拟器时,执行performSegue调用时,它会崩溃.调用堆栈在下面. *** Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[__NSArrayM insertO 在iOS 8.4,模拟器和手机中,我的performSegue调用没有遇到任何问题,但是当在 Xcode 7 beta 5上使用模拟器时,执行performSegue调用时,它会崩溃.调用堆栈在下面.
*** Terminating app due to uncaught exception 'NSRangeException',reason: '*** -[__NSArrayM insertObject:atIndex:]: index 3 beyond bounds [0 .. 1]'*** First throw call stack:(0   CoreFoundation                      0x00000001137509b5 __exceptionPreprocess + 1651   libobjc.A.dylib                     0x00000001131c8deb objc_exception_throw + 482   CoreFoundation                      0x00000001136179d5 -[__NSArrayM insertObject:atIndex:] + 9013   Foundation                          0x0000000110c42aa1 -[NSkeyvalueSlowMutableArray insertObject:atIndex:] + 1064   CoreFoundation                      0x000000011366beb2 -[NSMutableArray insertObjects:count:atIndex:] + 1625   CoreFoundation                      0x000000011366bc1f -[NSMutableArray insertObjectsFromArray:range:atIndex:] + 3356   CoreFoundation                      0x000000011366baa3 -[NSMutableArray addobjectsFromArray:] + 7237   UIKit                               0x00000001119ef467 -[UIRuntimeOutletCollectionConnection performConnect] + 8608   CoreFoundation                      0x0000000113691590 -[NSArray makeObjectsPerformSelector:] + 2249   UIKit                               0x000000011173ccaa -[UINib instantiateWithOwner:options:] + 186410  UIKit                               0x0000000111531df4 -[UIVIEwController _loadVIEwFromNibnamed:bundle:] + 38111  UIKit                               0x0000000111532720 -[UIVIEwController loadVIEw] + 17812  UIKit                               0x0000000111532a22 -[UIVIEwController loadVIEwIfrequired] + 13813  UIKit                               0x0000000111538e33 -[UIVIEwController __vIEwWillAppear:] + 12014  UIKit                               0x0000000111565cba -[UINavigationController _startCustomTransition:] + 117715  UIKit                               0x00000001115752f7 -[UINavigationController _startDeferredTransitionIfNeeded:] + 71216  UIKit                               0x00000001115761ad -[UINavigationController __vIEwWillLayoutSubvIEws] + 5717  UIKit                               0x00000001117082d1 -[UILayoutContainerVIEw layoutSubvIEws] + 24818  UIKit                               0x0000000111459a3b -[UIVIEw(CALayerDelegate) layoutSublayersOfLayer:] + 71019  QuartzCore                          0x00000001110f336a -[CALayer layoutSublayers] + 14620  QuartzCore                          0x00000001110e7bd0 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 36621  QuartzCore                          0x00000001110e7a4e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 2422  QuartzCore                          0x00000001110dc1d5 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 27723  QuartzCore                          0x00000001111099f0 _ZN2CA11Transaction6commitEv + 50824  UIKit                               0x00000001113d5eb0 _afterCACommitHandler + 17425  CoreFoundation                      0x000000011367c457 __CFRUNLOOP_IS_CALliNG_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 2326  CoreFoundation                      0x000000011367c3c7 __CFRunLoopDoObservers + 39127  CoreFoundation                      0x000000011367201b __CFRunLoopRun + 114728  CoreFoundation                      0x0000000113671918 CFRunLoopRunspecific + 48829  GraphiCSServices                    0x0000000115ee3ad2 GSEventRunModal + 16130  UIKit                               0x00000001113ac99e UIApplicationMain + 17131  MyApp                               0x000000010fbfe59f main + 11132  libdyld.dylib                       0x000000011429c92d start + 133  ???                                 0x0000000000000001 0x0 + 1)libc++abi.dylib: terminating with uncaught exception of type NSException

它似乎与我的代码有任何关系,因为它在转换过程中发生,我自己的函数都不在调用堆栈中.

有没有人经历过这个,和/或知道如何解决这个问题?我在我的第二个视图控制器的每个功能中都设置了断点,没有一个被击中.

解决方法 我相信这是错误.在我的情况下,它是指向TabbarVIEw.
performSegueWithIDentifIEr("tabSegue",sender: nil)

当它开始崩溃(这次发生的时间,而不改变sb),我只是从故事板中删除segue并创建它.它的作品

总结

以上是内存溢出为你收集整理的iOS 9 push segue导致我的应用程序崩溃全部内容,希望文章能够帮你解决iOS 9 push segue导致我的应用程序崩溃所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1097329.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-28
下一篇2022-05-28

发表评论

登录后才能评论

评论列表(0条)

    保存