My code does not work in Swift 5
var myTabBar = self.storyboard?.instantiateViewController(withIdentifier: "myTabBar") as! UITabBarController
var app = UIApplication.shared.delegate as! AppDelegate
app.window?.rootViewController = myTabBar
Value of type AppDelegate has no member window