views:

337

answers:

2

Is it possible to change the font size of tabs?

+1  A: 

Sorry, there's no way to do this. If you're desperate, you'll need to write your own tab bar.

Ben Gottlieb
A: 

Actually there is a way.

    NSMutableArray *tabBarItems = [[[[[self.view subviews] objectAtIndex:1] subviews] mutableCopy] autorelease];

for (int item = 0; item < [tabBarItems count]; item++) {
    for (int subview = 0; subview < [[[tabBarItems objectAtIndex:item] subviews] count]; subview++) {
        for (int item = 0; item < [tabBarItems count]; item++)  {
            for (int subview = 0; subview < [[[tabBarItems objectAtIndex:item] subviews] count]; subview++)  {
                if ([[[[tabBarItems objectAtIndex:item] subviews] objectAtIndex:subview] isKindOfClass:NSClassFromString(@"UITabBarButtonLabel")]) 
                    [[[[tabBarItems objectAtIndex:item] subviews] objectAtIndex:subview] setFont:[UIFont systemFontOfSize:6.0f]];
            }
        }
    }
}
Gi-lo