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

arnieterm

macrumors regular
Original poster
Aug 28, 2008
201
0
hi..
i wana make an application in which a tab bar controller is used with 4 tab buttons. the home page contains a logo of application & a tab bar controller at its bottom.
but by default , the first tab button is selected on tab bar controller. but as my requirement ,the selection of tab buttons of tab bar controller should be disabled on home page.
when i would select a tab button then the view for particular tab button should be opened.
:( My main prob is to disable the first tab button on tab bar controller on home page & insert a navigation controller with view on home page.
so if anyone has idea about this issue then plz do tell me.

regards.
 

neil.b

macrumors member
Nov 20, 2008
65
0
Try this;

(assumes your instance of the tab bar is called 'myTabBar' and that the button you want disabled is the first one i.e. index 0)

Code:
UITabBarItem *tabBarItem = [[myTabBar items] objectAtIndex:0];
[tabBarItem setEnabled:FALSE];
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.