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)
Asked
Active
Viewed 422 times
0
2 Answers
1
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
}

Rahul
- 322
- 1
- 5
- 18
0
Call this when you want to hide your tab bar:
[self.tabBarController.tabBar setHidden:YES];

thachnb
- 1,503
- 10
- 13