Ogni volta che ho aggiornato xcode non riesco a cambiare il titleTextAttribute
. Ora, quando io uso seguente codice ottengo questo errore:Modifica titleTextAttribute in swift
could not find an overload init that accepts this supplied arguments
Codice in appDelegate
:
UINavigationBar.appearance().titleTextAttributes = [NSFontAttributeName: UIFont(name: "Ubuntu", size: 17), NSForegroundColorAttributeName:UIColor.whiteColor()]
UIBarButtonItem.appearance().setTitleTextAttributes([NSFontAttributeName: UIFont(name: "Ubuntu-Light", size: 15), NSForegroundColorAttributeName:UIColor.whiteColor()], forState: UIControlState.Normal)
Nate! Nate! Nate! Nate! – rob5408
Ulteriori informazioni: http://stackoverflow.com/questions/27583346/how-can-i-change-the-font-of-the-back-button-for-my-navigation-bar/28347428#28347428 – Vexy