0
我改变取决于上下文tabbaritem图像没有改变
if (user == nil) {
self.navigationController?.tabBarItem.title = "Login"
self.navigationController?.tabBarItem.image = UIImage(named: "login")
} else {
self.navigationController?.tabBarItem.title = "Home"
self.navigationController?.tabBarItem.image = UIImage(named: "home")
self.view = homeView()
}
但是,当我有我的看法由homeView替换的图像没有变化的tabBarItem的形象,但标题被改变。
我怎样才能使它重定向到HomeView后立即改变了吗?
没有工作:/ –
噢,那我就不知道了。我很惊讶,它没有奏效,这听起来很有希望 – Eric