In trying to find a solution I came across this answer:
It seems to accomplish what I want it to, but in objective C:
UITabBarController *tabBar = (UITabBarController *)self.window.rootViewController;
tabBar.selectedIndex = 0;
How do I do this in swift? My first attempt returns an error
cannot convert the expression's type '$T4??' to type 'UITabBarController'
var tabBar: UITabBarController = self.window?.rootViewController
tabBar.selectedIndex = 1