我解決了我的問題。在我ApplicationDelegate
感謝
[window addSubview:tabBarController.view];
到http://www.mactech.com/articles/mactech/Vol.25/25.03/iPhoneProductivityApplicationsPart1/
:既然我已經有階級的指定
TabBarController
在IB我的標籤欄控制器,我添加了這個:
NSMutableArray *customizeable = [[NSMutableArray alloc] init];
for (id controller in tabBarController.customizableViewControllers)
{
if ([controller isKindOfClass: [MyCustomizeable class]])
[customizeable addObject:controller];
}
tabBarController.customizableViewControllers = customizeable;
[customizeable release];
只是波紋管
請注意,我可以用這些行來完成這項工作:
NSMutableArray *customizeable = [[NSMutableArray alloc] init];
tabBarController.customizableViewControllers = customizeable;
[customizeable release];
但我想控制哪些標籤可以重新編排