I'm trying to present a tabbar controller programmatically using the two methods below: ( but both methods are failing).
var window: UIWindow?
let storyboard : UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let myTabBar = storyboard.instantiateViewController(withIdentifier: "happy")
window?.rootViewController = myTabBar
I tested it on iOS 12, it works. But, when changing to iOS 13, it doesn't.
Another method: ( not tested on iOS 12).
let newVC = tabBarController?.storyboard?.instantiateViewController(withIdentifier: "okplz")
tabBarController?.present(newVC!, animated: true, completion: nil)