如何更改标签栏控制器项目名称的字体大小? [英] How to change the font size of the tab bar controller item name?
本文介绍了如何更改标签栏控制器项目名称的字体大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在做一个基于tabbarController的应用程序.我有3个标签栏项.
I am doing an app based on tabbarController. I have a 3 tabbar items.
我的问题是:如何更改选项卡栏项上标题的字体样式?
My question is: How can I change the font-style for the title on the tab-bar item?
推荐答案
[self.tabBarItem setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys:
[UIFont fontWithName:@"AmericanTypewriter" size:20.0f], UITextAttributeFont,
[UIColor blackColor], UITextAttributeTextColor,
[UIColor grayColor], UITextAttributeTextShadowColor,
[NSValue valueWithUIOffset:UIOffsetMake(0.0f, 1.0f)], UITextAttributeTextShadowOffset,
nil]];
这篇关于如何更改标签栏控制器项目名称的字体大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文