Hide tab bar item TabBarController in ios

原创文章,转载请注明来源并保留原文链接

If you want to get the items of the tabBar rearranged you have to remove the controller from the controllers list, not hide it. You can use this code to achieve this:

NSMutableArray *controllers = [NSMutableArray arrayWithArray:self.tabBarController.viewControllers];
[controllers removeObjectAtIndex:3];
[self.tabBarController setViewControllers:controllers animated:YES];

Leave a Reply

Your email address will not be published. Required fields are marked *