2010-05-04 42 views

回答

4

您是否尝试过使用UITabBaritems财产?例如:

// defined in IB 
#define kTabScores 1 
UITabBar *_tabBar; 


// in viewDidLoad 
#if !INCLUDE_SCORES_SUPPORT 
    NSMutableArray *newItems = [NSMutableArray arrayWithArray:_tabBar.items]; 
    [newItems removeObjectAtIndex:0]; //your index here. 
    [_tabBar setItems:newItems animated:YES]; 
#endif 
+0

这样做的窍门!需要注意的是它是arrayWithArray; arrayWithItems不存在。 – typeoneerror 2010-05-04 19:59:32

+0

哎呦。我那里的心理错误。 – 2010-05-05 02:00:28