I have a TabBarController
, and one of the tab item is a NavigationController
, and inside the NavigationController
is a TableView
. If press the cell, it will go to another ViewController
. And inside that ViewController
, there is a back button on the NavigationBar
(apparently), and if i press that button, i can go back to the TableView
.
The question is, after i go to the last ViewController
, how can i get rid of the tab Bar, and when i press the back button and go back to the TableView
, the tab Bar will still be there.
Btw, i'm coding with swift, so please give me some direction on swift rather than object-c. thanks
Asked
Active
Viewed 208 times
0

Fogmeister
- 76,236
- 42
- 207
- 306

王予智
- 11
- 1
- 2
-
You can use the accepted answer in this. Just put it in viewWillAppear or something. – Fogmeister Apr 18 '17 at 11:52
-
2there is another possibility than the one provided in the already answered thread: select the viewcontroller in storyboard where you want the tabbar to disappear (the last one in the hierarchy) and in the attributes inspector check "Hide Bottom Bar on Push"! – André Slotta Apr 18 '17 at 11:56
-
@AndréSlotta I believe that does the same thing but embedded inside the segue. But yes, would be easier to do this if you're already in a Storyboard. – Fogmeister Apr 18 '17 at 12:18
-
1@Fogmeister that's possible. Except there is no code needed :) just wanted to provide "an alternative"... – André Slotta Apr 18 '17 at 12:20
-
@AndréSlotta I agree :D – Fogmeister Apr 18 '17 at 12:20