I have a problem restoring state for view controller with hidesBottomBarWhenPushed=YES
pushed in UINavigationController that placed within UITabBarController.
What happens is basically the UINavigationController stack is restored and the right controller is on screen, but hidesBottomBarWhenPushed is not respected for that controller.
The only viable hack I came up with is the fast tab switch on viewDidAppear to make TabBar disappear as it supposed to happen if hidesBottomBarWhenPushed set:
- (void)_fixTabBarStateRestorationBug {
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
NSInteger currentTab = (NSInteger)self.tabBarController.selectedIndex;
self.tabBarController.selectedIndex = abs(currentTab - 1);
self.tabBarController.selectedIndex = currentTab;
});
}