I have an iPhone app which was built using a standard UITabBarController. This app was created using the standard XCode project template.
Now, I have a requirement to change the UITabBar to look very different. The approach I decided to take was like this:
in my AppDelegate:
for (UIView *view in tabBarController.view.subviews) {
if([view isKindOfClass:[UITabBar class]]) {
view.hidden = YES;
break;
}
}
This works to make the tab bar hidden. Next, I subclassed UITabBarController
and I add a UIToolbar
with a few custom components. In my subclassed UITabBarController
I have my code set up so that when one of my custom objects is selected, the code simply calls [self setSelectedIndex:n]
to update the UI.
So I basically have a UITabBarController but I am controlling it through a new UI.
The problem is that my new components aren't quite as tall as the normal UITabBar
and the UITabBarController seems to be not resizing my views automatically. I actually would expect this behavior, but I can't figure out how to change the "content frame" of a UITabBarController. Any ideas?