Closed kiwo12345 closed 8 years ago
Ok I found a solution/hack for this.
In storyboard set hidesBottomBarWhenPushed to true on both VC1 and VC2.
Then add this to VC1 in viewdidLoad:
let animatedTabBar = self.tabBarController as! RAMAnimatedTabBarController
animatedTabBar.animationTabBarHidden(false)
And in VC2 add the reverse in viewDidLoad:
let animatedTabBar = self.tabBarController as! RAMAnimatedTabBarController
animatedTabBar.animationTabBarHidden(true)
+
override func viewWillDisappear(animated: Bool) {
// Show TabBar
super.viewWillDisappear(animated)
let animatedTabBar = self.tabBarController as! RAMAnimatedTabBarController
animatedTabBar.animationTabBarHidden(false)
}
This will hide/show both the tab bar and its items when going back and forth the two VC's
It works!!!!!!!!! Thanks A Lot!!!!!!
It works very well on hide and show the tab bar / items back. In my case, I have two tab bar items, when I switch to another tab, the tab bar was miss.
hidesBottomBarWhenPushed
breaksanimationTabBarHidden()
I am using
animationTabBarHidden()
in order to hide the tab bar items. But this will leave a blank space on the bottom of my screen so I also need to sethidesBottomBarWhenPushed = true
When I now push from Vc1 to Vc2 the tab bar + the items is hidden which is right. But when I go back again from Vc2 to Vc1 the tab bar + items will show up again but then the tab bar items disappears again