应用程序尝试以模态方式呈现活动控制器崩溃

时间:2016-06-12 13:35:05

标签: objective-c animation uiviewcontroller crash

我只在hocky应用程序上得到该错误,我无法重现它 ItemsViewController没有以模态方式呈现,并且始终使用[self performSegueWithIdentifier:@“show-items”sender:self]调用它; 崩溃发生的任何帮助很多。

Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Application tried to present modally an active controller <ItemsViewController: 0x128e046f0>.'

Last Exception Backtrace: 0   CoreFoundation                       0x000000018353edb0 __exceptionPreprocess + 124 1   libobjc.A.dylib     0x0000000182ba3f80 objc_exception_throw + 52 2   UIKit                 0x0000000188a1efb4 -[UIViewController
_presentViewController:withAnimationController:completion:] + 4992 3   UIKit                                0x0000000188a21890
-[UIViewController _performCoordinatedPresentOrDismiss:animated:] + 468 4   UIKit                                0x00000001887973cc
-[UIViewController presentViewController:animated:completion:] + 180 5   UIKit                                0x0000000188cf5a98
-[UIPreviewInteractionController startInteractivePreviewAtLocation:inView:] + 1636 6   UIKit            0x0000000188cf600c -[UIPreviewInteractionController startInteractivePreviewWithGestureRecognizer:] + 132 7   UIKit         0x0000000188cf7084 -[UIPreviewInteractionController
_handleRevealGesture:] + 96 8   UIKit                                0x0000000188c2df30 _UIGestureRecognizerSendTargetActions + 160 9   UIKit                                0x0000000188842728
_UIGestureRecognizerSendActions + 168 10  UIKit                                0x00000001886cf7a0 -[UIGestureRecognizer
_updateGestureWithEvent:buttonEvent:] + 780 11  UIKit                                0x0000000188c2f530 ___UIGestureRecognizerUpdate_block_invoke898 + 68 12  UIKit                                0x000000018868e4d8
_UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 368 13  UIKit                                0x000000018868b254
_UIGestureRecognizerUpdate + 2400 14  UIKit                                0x00000001886cd610 -[UIWindow _sendGesturesForEvent:] + 1128 15  UIKit 0x00000001886ccc0c -[UIWindow sendEvent:] + 760 16  UIKit              0x000000018869d04c -[UIApplication sendEvent:] + 244 17  Q8ForSale     0x0000000100685250 -[IBGMethodSwizzler sendEvent:] + 340 18  UIKit     0x000000018869b628 _UIApplicationHandleEventQueue + 6564 19  CoreFoundation                       0x00000001834f509c
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 20 20  CoreFoundation                       0x00000001834f4b30
__CFRunLoopDoSources0 + 536 21  CoreFoundation                       0x00000001834f2830 __CFRunLoopRun + 720 22  CoreFoundation             0x000000018341cc50 CFRunLoopRunSpecific + 380 23  GraphicsServices     0x0000000184d04088 GSEventRunModal + 176 24  UIKit                     0x0000000188706088 UIApplicationMain + 200 25  Q8ForSale               0x00000001000ba8f4 main (main.m:14) 26  libdyld.dylib                  0x0000000182fba8b8 start + 0

1 个答案:

答案 0 :(得分:0)

如果没有看到一些源代码片段和segue配置,很难分辨出发生了什么。 问题的一个原因是,在界面构建器中执行模型演示操作的手势/按钮可能存在附加操作。