user2636197 user2636197 - 1 year ago 144
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 Source

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download