json返回后,我的TabbarController不会显示添加的新Navigationcontrollers

问题描述

我正在尝试构建一个将Viewcontroller划分为2部分(每个容器)的应用程序 已经将UItabbarcontroller连接到每个部分。我的第二个标签栏是动态的,将调用json并在其中使用uicontroller来构建navigationcontroller并将其添加到uitabbarcontroller中。 问题什么都没显示! 这是我的故事板: Terminal error: zsh: permission denied: ./startup.sh

 func buildTabbarController(data : [Place]) -> Void {
    dispatchQueue.main.async(execute: {
       
    var navigationcontrollers = [UIViewController]()

    for place in data{
        let nc = UINavigationController(rootViewController: self.devicesTabbarController.self)
        let vc = UIViewController()
      
        vc.view.backgroundColor = .brown
        vc.title = place.name
        navigationcontrollers.append(nc)
        nc.viewControllers = [vc]
    }
        self.devicesTabbarController!.self.setViewControllers(navigationcontrollers,animated: true)
      
        self.devicesTabbarController.view.backgroundColor = .cyan
    })
    }
    
    

override func prepare(for segue: UIStoryboardSegue,sender: Any?) {
    if let vc = segue.destination as? DevicesTabbarController {
        self.devicesTabbarController = vc
       
        
}

感谢您的帮助。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)