2016-04-19 19 views

Antwort

8

Sie können es über das Aussehen Proxy ändern:

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

Sie sollten diese Delegierten in Ihrer Anwendung setzen in func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool

+0

Wo gebe ich diesen Code ein? – user2636197

+0

@ user2636197 sehen Sie die aktualisierte Antwort und bitte akzeptieren, wenn dies für Sie funktioniert – slessans

+0

Ich bekomme Fehler: Wert des Typs 'UITabBarItem' hat kein Mitglied 'titleTextAttributes' – user2636197

2

Update für rasche 3.

Setzen Sie dieses in AppDelegate in func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool

UITabBarItem.appearance().setTitleTextAttributes([NSFontAttributeName: yourFont], for: .normal) 
Verwandte Themen