0

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)

aek8
  • 319
  • 1
  • 8
  • 22
Ihor M.
  • 184
  • 10

2 Answers2

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