Reputation: 610
I try do it in willMove method but get bug when I break gesture(swipe to back VC)
override func willMove(toParent parent: UIViewController?) {
super.willMove(toParent: parent)
self.tabBarController?.tabBar.isHidden = true
}
Upvotes: 0
Views: 73
Reputation: 5679
In your current view controller:
In viewDidDisappear
:
self.tabBarController?.tabBar.isHidden = true
In ViewDidAppear
:
self.tabBarController?.tabBar.isHidden = false
Upvotes: 0
Reputation: 250
Use below method in ViewDidLoad() of ViewController(where you are going)
self.tabBarController?.tabBar.isHidden = true
and in ViewDidDisappear()
self.tabBarController?.tabBar.isHidden = false
Upvotes: 2