I have run across this where I need to know whether my current viewcontroller is on moreNavigationController or it is a tab item. Basically I want to hide TabBar for some of my screens and giving choice to user to move back to homescreen(ideally previous screen) using left navigation button! If my view controller is on moreNavigationController then I can simply popViewControllerAnimated:YES and it will go back to More screen but when it is Tab item then I need to change the selected tab index.
Is there anyway to know whether current view controller is on moreNavigationController?
Thanks.
I don't have a project to test it on, but I think this might do it.
BOOL isOnMore = ([self.tabBarController.moreNavigationController.viewControllers containsObject:self]);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With