答案 0 :(得分:0)
@SamahAhmed
let storyboard = UIStoryboard.init(name: "Main", bundle: nil)
let diallerTBC = storyboard.instantiateViewControllerWithIdentifier("tabBarStoryboardId") as! MyTabbarController
//create a variable for e.g : data at MyTabbarController and set like
diallerTBC.data = "testing"
答案 1 :(得分:-1)
当您点击按钮移动标签栏控制器
时向tabbar提供storyboard id并使用下面的代码
在appdelegate中将其写为类方法,并在按钮单击
上调用它 let storyboard = UIStoryboard.init(name: "Main", bundle: nil)
let diallerTBC = storyboard.instantiateViewControllerWithIdentifier("tabBarStoryboardId") as! UITabBarController
self.window?.rootViewController = diallerTBC
self.window?.makeKeyAndVisible()
}
我希望这会起作用
由于