Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the font settings used on native UITabBarItem

I'm trying to duplicate the naive font settings used on a UITabBarItem for use on a custom tabbar.

Does anyone know what the font settings are? What UIFont, font size, text color, etc...?

like image 726
cpjolicoeur Avatar asked Jan 20 '23 12:01

cpjolicoeur


1 Answers

I used the settings below to replicate the native font:

UILabel* tabBarItemLabel = [[[UILabel alloc] init] autorelease];
tabBarItemLabel.font = [UIFont boldSystemFontOfSize:10];
tabBarItemLabel.textColor = [UIColor colorWithRed:153.0/255.0 green:153.0/255.0 blue:153.0/255.0 alpha:1];
tabBarItemLabel.shadowColor = [UIColor clearColor];
tabBarItemLabel.backgroundColor = [UIColor clearColor];
like image 59
dessy Avatar answered Mar 06 '23 00:03

dessy