【发布时间】:2019-10-04 13:22:22
【问题描述】:
我正在尝试以编程方式更改 didFinishLaunchingWithOptions 方法中的标签栏,但它不起作用,知道吗?
我试过了:
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
if let tabBarController = self.window!.rootViewController as? UITabBarController {
tabBarController.selectedIndex = 0
}
return true
}
谢谢,
【问题讨论】:
标签: tabs tabbarcontroller