我如何设置可在实例化后迅速5推送的初始viewController

问题描述 投票:0回答:1

使用此代码后,我无法从初始viewController推送

self.window = UIWindow(frame:UIScreen.main.bounds)

    let storyboard = UIStoryboard(name: "Main", bundle: nil)

    let initialViewController = storyboard.instantiateViewController(withIdentifier: Identifier)

    self.window?.rootViewController = initialViewController
    self.window?.makeKeyAndVisible()
ios swift iphone uinavigationcontroller appdelegate
1个回答
0
投票

您必须将UIViewController嵌入UINavigationController中。试试这个:

© www.soinside.com 2019 - 2024. All rights reserved.