2010-05-04 78 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