0

I want to increase the Text size of UITabBarItem in my application.It is not visible clearly with its default color and size.

I tried this code but give me error -->UITabBar for instant message does not declare method with selector 'setTitleTextAttributes'.

Does any know how to do it?

[yourTabBarItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
    [UIColor whiteColor], UITextAttributeTextColor, 
    [NSValue valueWithUIOffset:UIOffsetMake(0,0)], UITextAttributeTextShadowOffset, 
    [UIFont fontWithName:@"Helvetica" size:18.0], UITextAttributeFont, nil]
    forState:UIControlStateNormal];
Hailei
  • 42,163
  • 6
  • 44
  • 69

3 Answers3

1

I think the default size is fully conveninet for the user. Anyway you want, maybe you should make your own <Tabbar> with UIView, UIButtons and UITabbar-style images.

Charles Menguy
  • 40,830
  • 17
  • 95
  • 117
sky1224
  • 158
  • 1
  • 9
0

setTitleTextAttributes:forState: is only available in iOS 5.0 or later. Please refer to UIBarItem Class Reference (UITabBarItem is subclass of UIBarItem). For prior versions of iOS, I think you'd better create your own customized tab bar.

And you may also want to try other methods from the answers in Changing font size of tabbaritem.

Community
  • 1
  • 1
Hailei
  • 42,163
  • 6
  • 44
  • 69
0

For that you should create dynamic tab bar using UITabbar class.

.Using this You can allow own size text ,image,color.

vishiphone
  • 750
  • 7
  • 14