Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 3    Views: 62

Agu
Lost but trying
Profile
Posts: 98
Reg: Mar 06, 2014
GRANADA
980
05/04/14 12:43 PM (10 years ago)

tabbed layout

Hello, how can i change the size of the font in tabs in tabbed layout? some words broke in two lines. I try to reduce the images to give more space, but is not enought. Thanks!!
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
05/04/14 03:38 PM (10 years ago)
I have not seen the font-size be any larger for Tab items. I assume Apple does not allow those types of changes. Changing the image sizes will not give the Tab titles more room. However, you can try this technique that I found on Stack Overflow. I am not sure if the font-size setting actually works. 1) If you want to customize the TabBar itself, you need to set the barTintColor for the tabBarController: // this will generate a black tab bar tabBarController.tabBar.barTintColor = [UIColor blackColor]; // this will give selected icons and text your apps tint color tabBarController.tabBar.tintColor = appTintColor; // appTintColor is a UIColor * 2) Set the tabBarItem text appearance for each state that you want to override: [[UITabBarItem appearance] setTitleTextAttributes:@{NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue-Bold" size:10.0f], NSForegroundColorAttributeName : appTintColor } forState:UIControlStateSelected]; // doing this results in an easier to read unselected state then the default iOS 7 one [[UITabBarItem appearance] setTitleTextAttributes:@{NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue-Bold" size:10.0f], NSForegroundColorAttributeName : [UIColor colorWithRed:.5 green:.5 blue:.5 alpha:1] } forState:UIControlStateNormal]; http://stackoverflow.com/questions/18734794/how-can-i-change-the-text-and-icon-colors-for-tabbaritems-in-ios-7 -- Niraj
 
Agu
Lost but trying
Profile
Posts: 98
Reg: Mar 06, 2014
GRANADA
980
like
05/07/14 11:13 PM (10 years ago)
Thanks!I'll try it.
 
Agu
Lost but trying
Profile
Posts: 98
Reg: Mar 06, 2014
GRANADA
980
like
05/07/14 11:16 PM (10 years ago)
Thanks!I'll try it.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.