Swift 选中指定的tabbar

let appDelegate = (UIApplication.shared.delegate)!
                    let tabBar = appDelegate.window!?.rootViewController as! UITabBarController
                    tabBar.selectedIndex = 0

你可能感兴趣的:(Swift 选中指定的tabbar)