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.
Without fanfare:
// 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];
Thanks for posting. Yeah, I know not exactly rocket science but I copy, pasted and works perfectly.
LikeLike