In my application, I hide tabbar by setting hidesBottomBarWhenPushed
property of UIViewController
. I'm not sure this behavior is designed or not, when I called popToRootViewController
to pop all view controller stack, tabbar did not show properly if I pushed same view controller after. Even I tried to show tabbar by setting isHidden
property after I called popToRootViewController
but it didn't work neither. Weird part is, after tabbar disappeared, I pushed same view controller and I could see the tabbar when I tried to pop the view controller (not popToRootViewController) by using gesture to pop (swipe to pop). Though it disappeared when transition was completed.
FYI, this is step by step to produce this behavior.
- init tabbar and navigation controllers on two tabs.
- push view controller (
hidesBottomBarWhenPushed
is true) on one tab's navigation controller - pop all view controller from the navigation controller by calling
popToRootViewController
4 change tab index by settingselectedIndex
on tabbarController - push the same view controller
How does hidesBottomBarWhenPushed
property work in detail to show/hide tabbar?