Reputation: 119
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];
Upvotes: 0
Views: 1334
Reputation: 750
For that you should create dynamic tab bar using UITabbar class.
.Using this You can allow own size text ,image,color.
Upvotes: 0
Reputation: 42153
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.
Upvotes: 0
Reputation: 158
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.
Upvotes: 1