1
votes

I have a tabbar controller with 3 tabs, each tab has navigation controller, on root view controller of each navigation controller i want tabbar and on other view controller in same navigation controller i dont want tabbar.

Any solution?

4
set the alpha of the tabbar to 0 and userinteraction to falseMohammad Bashir Sidani
@MohammadBashirSidani i dont want to show tabbar at allchetan panchal
Setting alpha value 0 to tab Bar hides all items and including tab barJohn

4 Answers

1
votes

set self.tabBarController?.tabBar.isHidden = true in viewWillAppear method of your controller when you don't want tabbar

override func viewWillAppear(_ animated: Bool) {
        self.tabBarController?.tabBar.isHidden = true
}
0
votes

Setting alpha value 0 to tab Bar hides all items and including tab bar enter image description here

0
votes

You should set the tabbar alpha to 0. This will hide the UITabBar. However you need to set isUserInteractionEnabled to false since even when its hided, the buttons are there & clickable still!

Hope this helps!

0
votes
  1. Set Transculent property of Tab bar to true or check the same from storyboard
  2. Set hidesTabbarWhen Pushed property of Tab bar to true or check the same from storyboard
  3. Set Tab bar hidden true on view controller where you want Tab bar and set Tab bar hidden to false on view controller where you don't want Tab bar