gpt4 book ai didi

ios - Storyboard线程错误

转载 作者:行者123 更新时间:2023-12-02 03:07:05 25 4
gpt4 key购买 nike

嗨,我不断收到线程错误。我制作了一个非常简单的 Storyboard,有两个屏幕。第一个有一个按钮可以通向第二个。当我运行该应用程序并单击按钮时,它因线程错误而崩溃。我还没有编写任何代码,只是在 Storyboard上工作。如果您可以请告诉我是什么原因造成的,或者我如何解决造成它的原因,因为我无法理解线程调试错误。

2013-10-10 20:18:54.249 Quote[851:a0b] * Terminating app due to uncaught exception 'NSGenericException', reason: 'Push segues can only be used when the source controller is managed by an instance of UINavigationController.' * First throw call stack: ( 0 CoreFoundation 0x017475e4 exceptionPreprocess + 180 1 libobjc.A.dylib 0x014b68b6 objc_exception_throw + 44 2 UIKit 0x0076c605 -[UIStoryboardPushSegue destinationContainmentContext] + 0 3 UIKit 0x0075c9de -[UIStoryboardSegueTemplate _perform:] + 174 4 UIKit 0x0075ca59 -[UIStoryboardSegueTemplate perform:] + 115 5 libobjc.A.dylib 0x014c8874 -[NSObject performSelector:withObject:withObject:] + 77 6 UIKit 0x0022ac8c -[UIApplication sendAction:to:from:forEvent:] + 108 7 UIKit 0x0022ac18 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61 8 UIKit 0x003226d9 -[UIControl sendAction:to:forEvent:] + 66 9 UIKit 0x00322a9c -[UIControl _sendActionsForEvents:withEvent:] + 577 10 UIKit 0x00321d4b -[UIControl touchesEnded:withEvent:] + 641 11 UIKit 0x002680cd -[UIWindow _sendTouchesForEvent:] + 852 12 UIKit 0x00268d34 -[UIWindow sendEvent:] + 1232 13 UIKit 0x0023ca36 -[UIApplication sendEvent:] + 242 14 UIKit 0x00226d9f _UIApplicationHandleEventQueue + 11421 15 CoreFoundation 0x016d08af __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 15 16 CoreFoundation 0x016d023b __CFRunLoopDoSources0 + 235 17 CoreFoundation 0x016ed30e __CFRunLoopRun + 910 18 CoreFoundation 0x016ecb33 CFRunLoopRunSpecific + 467 19 CoreFoundation 0x016ec94b CFRunLoopRunInMode + 123 20 GraphicsServices 0x036849d7 GSEventRunModal + 192 21 GraphicsServices 0x036847fe GSEventRun + 104 22 UIKit 0x0022994b UIApplicationMain + 1225 23 Quote 0x0000217d main + 141 24 libdyld.dylib 0x01d6f725 start + 0 25 ??? 0x00000001 0x0 + 1 ) libc++abi.dylib: terminating with uncaught exception of type NSException (lldb)

最佳答案

“只有当源 Controller 由 UINavigationController 的实例管理时才能使用推送转场。”

这是你的问题,Push Segues 只能与 UINavigationController 一起使用。要将您的第一个 View Controller 放入导航 Controller 中,请单击您的第一个 View Controller ,然后单击“编辑器”>“嵌入”>“导航 Controller ”。

关于ios - Storyboard线程错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19304283/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com