Swift 当按下下一个控制器时,动画在消失之前显示黑色选项卡栏
我使用以下代码:Swift 当按下下一个控制器时,动画在消失之前显示黑色选项卡栏,swift,tabbar,pushviewcontroller,Swift,Tabbar,Pushviewcontroller,我使用以下代码: override func viewWillDisappear(_ animated: Bool) { self.tabBarController?.tabBar.isTranslucent = true self.tabBarController?.tabBar.isHidden = true } 当按下下一个控制器时,我可以看到下一个bug(黑色背景而非白色): 如何将黑色背景更改为白色?用下一个代码修复了它: tabBarController?.vie
override func viewWillDisappear(_ animated: Bool) {
self.tabBarController?.tabBar.isTranslucent = true
self.tabBarController?.tabBar.isHidden = true
}
当按下下一个控制器时,我可以看到下一个bug(黑色背景而非白色):
如何将黑色背景更改为白色?用下一个代码修复了它:
tabBarController?.view.backgroundColor = .white