user2636197 user2636197 - 1 month ago 8
iOS Question

swift change tab bar title font

I wonder how I can change the font and size of title in my tabs when I use tab bar.

I have looked in the docs and I cant find anything about title font and size - source

Answer

You can change it via the appearance proxy:

let font: UIFont = ...
UITabBarItem.appearance().setTitleTextAttributes([NSFontAttributeName: font], forState: .Normal)

You should put this in your app delegate in func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool

Comments