Reputation: 302
When I try to show view controller in UISplitView
, I need to hide tab bar. I try use hidesBottomBarWhenPushed
, but its not works. Is it possible to hide tab bar on showDetail
without smell code? (like viewwillappear
etc)
Upvotes: 0
Views: 475
Reputation: 332
Without code, it's not possible to do so. Add these lines in splitViewController class.
Swift 3:
override func viewWillAppear(animated: Bool) {
super.viewWillAppear(animated)
self.tabBarController?.tabBar.isHidden = true
}
override func viewWillDisappear(animated: Bool) {
super.viewWillAppear(animated)
self.tabBarController?.tabBar.isHidden = false
}
Upvotes: 1
Reputation: 1533
Call this when you want to hide your tab bar:
[self.tabBarController.tabBar setHidden:YES];
Upvotes: 0