Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

balanetmail

macrumors newbie
Original poster
Dec 11, 2009
2
0
Hi Guys,

I am very new to iphone and XCode i am trying to create a tab based application in that from the first page according to clicking of a button i need to remove/hide some of the tab added in the tabbar.
Can any one help me out Plz.

Thanks and Regards,
Bala.
 
The buttons on the tabbar are stored an an array, all you have to do is remove the button or add a button programmatically to the array in that event action.
 
Got the result

Got it and i used the code like...

NSUInteger indexToRemove = 3;
NSMutableArray *controllersToKeep = [NSMutableArray arrayWithArray:tabBarController.viewControllers];
UIViewController *removedViewController = [[controllersToKeep objectAtIndex:indexToRemove] retain];
[controllersToKeep removeObjectAtIndex:indexToRemove];
[tabBarController setViewControllers:controllersToKeep animated:YES];

Thanks a lot KoolStar for your replay

Now it is working....

:):):)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.