'Directly modifying a tab bar managed by a tab bar controller is not allowed.'
Instead, use the UITabBarController's viewControllers property and your tab will be properly removed without throwing an exception
// Remove the first tab from a tab bar controlled by a UITabController
NSMutableArray * vc = [NSMutableArray
arrayWithArray:[self.tabBarController viewControllers]];
[vc removeObjectAtIndex:0];
[self.tabBarController setViewControllers:vc];
No comments:
Post a Comment