Tabbar中的自定义字体

Nar*_*lle 2 iphone fonts objective-c uitabbarcontroller

嘿,
有没有办法将tabbar的字体设置为例如Chalkboard?我已经看到了字体大小的问题,并尝试使用字体,但循环不会有效.

如果无法使用自定义字体,是否可以删除所有文本并使tabbar的项目覆盖整个选项卡?或者我可以以某种方式将imageView放在标签栏的顶部并使用标签"通过"该图像?

谢谢!

Nar*_*lle 6

我发现自己是一个非常简单的教程,可以完全满足我的需求.为了进一步参考和所有人,也可能需要这个,这里是链接

第1部分

第2部分


Fab*_*erg 5

放入AppDelegate.m下:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions

这是代码:

    NSMutableDictionary *attributes = [NSMutableDictionary dictionaryWithDictionary: [[UITabBarItem appearance] titleTextAttributesForState:UIControlStateNormal]];
[attributes setValue:[UIFont fontWithName:@"Avenir" size:10] forKey:UITextAttributeFont];
[[UITabBarItem appearance] setTitleTextAttributes:attributes1 forState:UIControlStateNormal];
Run Code Online (Sandbox Code Playgroud)