Skip to content

Instantly share code, notes, and snippets.

@AttiaMo
Created November 12, 2017 15:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AttiaMo/b71d9cd71806e12797f5d9f676985499 to your computer and use it in GitHub Desktop.
Save AttiaMo/b71d9cd71806e12797f5d9f676985499 to your computer and use it in GitHub Desktop.
Setup global appearance of custom font in your whole app.
func setupGlobalAppearance(){
//global Appearance settings
let customFont = UIFont.appRegularFontWith(size: 17)
UIBarButtonItem.appearance().setTitleTextAttributes([NSAttributedStringKey.font: customFont], for: .normal)
UITextField.appearance().substituteFontName = Constants.App.regularFont
UILabel.appearance().substituteFontName = Constants.App.regularFont
UILabel.appearance().substituteFontNameBold = Constants.App.boldFont
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment