0
override func viewDidAppear(animated: Bool) {
super.viewDidAppear(animated)
println("TabBar viewDidAppear")
self.checkForNewKey()
if freshLaunch == true {
freshLaunch = false
self.tabBar.selectedItem = tabBar.items![2] as? UITabBarItem
}
}
我这样做...但整个应用程序崩溃(不知道为什么)。我的标签栏中有5个项目。如何更改iOS Swift中的默认标签栏项目?
我已经试过这一点,但什么都没有发生。 – TIMEX
tabbar是否配置正确?你确定.. –
这是你的tabbarcontroller? –