回答我的问题:
// UITabBarControllerDelegate
- (void)tabBarController:(UITabBarController *)tabBarController didEndCustomizingViewControllers:(NSArray *)viewControllers changed:(BOOL)changed
{
if (changed) { // swap tabBar titles for the controllers with long and short names
int index = 0; // 0, 1, 2, 3 are on the tab bar, others are on the More tableView
for (UINavigationController *aNavController in viewControllers) {
if (index > 3) { // use long names, look for short names
if ([aNavController.tabBarItem.title ieq:@"Short"]) {
aNavController.tabBarItem.title = @"The Long Title";
}
} else { // use short names, look for long names
if ([aNavController.tabBarItem.title ieq:@"The Long Title"]) {
aNavController.tabBarItem.title = @"Short";
}
}
index++;
}
}
}
:在的UITabBarController delgate用蛮力