There is a right way, and a wrong way, to remove a tab from a tab bar in a tab bar controller within an iOS app. I’m not going to show the wrong way.
// Remove the third tab from a tab bar controlled by a tab bar controller NSMutableArray * vcs = [NSMutableArray arrayWithArray:[self.tabBarController viewControllers]]; [vcs removeObjectAtIndex:2]; [self.tabBarController setViewControllers:vcs];
2 thoughts on “Programmatically Removing a Tab from UITabBarController”
Thanks for posting. Yeah, I know not exactly rocket science but I copy, pasted and works perfectly.