gpt4 book ai didi

ios - AMSlideMenu 崩溃 : Receiver () has no segue with identifier 'rightMenu'

转载 作者:行者123 更新时间:2023-11-28 21:58:56 24 4
gpt4 key购买 nike

我知道已经有一个 question关于这个,但是提供的答案并没有解决我的问题。

首先,我有 3 个三个 segues 指向 3 个不同的 View Controller 并且来自 AMSlideMenuLeftTableViewController 类。我创建的第一个 segue 和 View Controller 是作为第一个 View 出现的 View (应用程序加载时显示的 View )。

但是,由于我删除了第一个 View ,所以我的应用程序在打开后立即崩溃。

这是崩溃日志:

2014-09-02 17:17:56.200 App[3174:60b] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Receiver (<MenuViewController>: 0x10db0da10>) has no segue with identifier 'rightMenu''
*** First throw call stack:
(
0 CoreFoundation 0x0000000100433495 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001030f499e objc_exception_throw + 43
2 UIKit 0x0000000101d99515 -[UIViewController shouldPerformSegueWithIdentifier:sender:] + 0
3 App 0x000000010002d67f -[AMSlideMenuMainViewController setup] + 1071
4 App 0x000000010002aae1 -[AMSlideMenuMainViewController viewDidLoad] + 353
5 App 0x00000001000915e6 -[MenuViewController viewDidLoad] + 54
6 UIKit 0x0000000101d9759e -[UIViewController loadViewIfRequired] + 562
7 UIKit 0x0000000101d97777 -[UIViewController view] + 29
8 UIKit 0x00000001020a22e2 -[UIClientRotationContext initWithClient:toOrientation:duration:andWindow:] + 390
9 UIKit 0x0000000101cddffa -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 1109
10 UIKit 0x0000000101cddb9f -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:] + 36
11 UIKit 0x0000000101cddaef -[UIWindow _setRotatableViewOrientation:updateStatusBar:duration:force:] + 101
12 UIKit 0x0000000101cdcdfe -[UIWindow _updateToInterfaceOrientation:duration:force:] + 377
13 UIKit 0x0000000101d9b70a -[UIViewController _tryBecomeRootViewControllerInWindow:] + 147
14 UIKit 0x0000000101cd7b1b -[UIWindow addRootViewControllerViewIfPossible] + 490
15 UIKit 0x0000000101cd7c70 -[UIWindow _setHidden:forced:] + 282
16 UIKit 0x0000000101ce0ffa -[UIWindow makeKeyAndVisible] + 51
17 UIKit 0x0000000101c9cc98 -[UIApplication _callInitializationDelegatesForURL:payload:suspended:] + 1788
18 UIKit 0x0000000101ca0a0c -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 660
19 UIKit 0x0000000101cb1d4c -[UIApplication handleEvent:withNewEvent:] + 3189
20 UIKit 0x0000000101cb2216 -[UIApplication sendEvent:] + 79
21 UIKit 0x0000000101ca2086 _UIApplicationHandleEvent + 578
22 GraphicsServices 0x0000000104eff71a _PurpleEventCallback + 762
23 GraphicsServices 0x0000000104eff1e1 PurpleEventCallback + 35
24 CoreFoundation 0x00000001003b5679 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 41
25 CoreFoundation 0x00000001003b544e __CFRunLoopDoSource1 + 478
26 CoreFoundation 0x00000001003de903 __CFRunLoopRun + 1939
27 CoreFoundation 0x00000001003ddd83 CFRunLoopRunSpecific + 467
28 UIKit 0x0000000101ca02e1 -[UIApplication _run] + 609
29 UIKit 0x0000000101ca1e33 UIApplicationMain + 1010
30 App 0x0000000100076503 main + 115
31 libdyld.dylib 0x0000000103ddd5fd start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)

我认为问题在于该应用试图将我删除的 View 显示为主视图,但它不存在。事实上,我没有找到对我删除的那个旧 View 的任何引用。

最佳答案

如果 AMSlideMenu 在尝试创建 LeftMenu 时捕获到异常,它会尝试创建 RightMenu(我不明白为什么,但是是真的)。​​

在我的例子中,左侧菜单 firstSegue 指向一个“错误的 View ”,因为它是一个简单的 View Controller ,而不是导航 Controller 。我将 View Controller 更改为导航 Controller (指向我原来的 View Controller ),并修复了它。

关于ios - AMSlideMenu 崩溃 : Receiver (<MenuViewController: 0x10db0da10>) has no segue with identifier 'rightMenu' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25627167/

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