镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

纯代码开发,window!.rootViewController = UINavigationController(rootViewController: MainController()) 方式跳转,项目崩溃 #84

Open

Description

@tikejc

1、MainController 实现了UITabBarController
class MainController: UITabBarController { }
2、QMUIKit:版本号:4.7.0

3、AppDelegate类里直接跳转到MainController(使用的是UINavigationController方式跳转)
window = UIWindow(frame: UIScreen.main.bounds)
window!.rootViewController = UINavigationController(rootViewController: MainController())
window!.makeKeyAndVisible()

4、项目直接崩溃,出错位置:UINavigationController+QMUI.m 类 203行:
if (!willPushActually) {
QMUIAssert(NO, @"UINavigationController (QMUI)", @"调用了 pushViewController 但实际上没 push 成功,viewController:%@", viewController);
callSuperBlock();
return;
}

这个怎么解决????

Activity

  1. changed the title [-]纯代码开发,window!.rootViewController = UINavigationController(rootViewController: MainController()) 方式调整,项目崩溃[/-] [+]纯代码开发,window!.rootViewController = UINavigationController(rootViewController: MainController()) 方式跳转,项目崩溃[/+] on Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions