正在显示两个导航栏

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

它显示了两个navigationBarControllers!

顶部蓝色和默认导航栏下方。

enter image description here

var rootVC = CustomNavigationController()
    let tabbarViewController  = UIStoryboard(name: AppStoryboard.dashboard.rawValue, bundle: nil).instantiateViewController(withIdentifier: "TabBarViewController") as! TabBarViewController
    rootVC = CustomNavigationController.init(rootViewController: tabbarViewController)

    let appDelegate = UIApplication.shared.delegate as! AppDelegate
    appDelegate.window?.rootViewController = rootVC
ios swift uinavigationcontroller uitabbarcontroller
1个回答
0
投票

如果在Tabbar之前已经具有导航控制器,则无需为该Tabbar中的每个viewController创建另一个导航控制器。>

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