Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing font size of tabbaritem

Is it possible to change the font size of tabs?

like image 610
4thSpace Avatar asked Apr 05 '10 01:04

4thSpace


People also ask

How do I change font color on tab bar?

How to change tab bar text color (selected/unselected) In tab bar, there are two states of the text. One is when tab is selected and another one is when the tab is unselected. To change the text color for selected state, inside the TabBar widget, add the labelColor property and set the color.

How do I create a custom tab bar in Swift?

Implement a view controller that can hold some other view controllers. Show one of those view controllers. Show a tab bar at the bottom of the screen over the shown view controller. Switch between the various view controllers when the user taps on a tab bar button.


1 Answers

I recommend a better way:

[yourTabBarItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:     [UIColor whiteColor], UITextAttributeTextColor,      [NSValue valueWithUIOffset:UIOffsetMake(0,0)], UITextAttributeTextShadowOffset,      [UIFont fontWithName:@"Helvetica" size:18.0], UITextAttributeFont, nil]     forState:UIControlStateNormal]; 
like image 154
Cancer86 Avatar answered Sep 27 '22 22:09

Cancer86