UIDefaultFont 1.0.0

UIDefaultFont 1.0.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Oct 2017
SwiftSwift Version 4.0
SPMSupports SPM

Maintained by Gaël Foppolo.










Replace the system font in the whole app easily

No more wasted time and effort, searching and overriding the font of every displayed string in your app. At runtime, you can change the system font and it will be replaced everywhere it's used in the application.

This library is simply one extension to UIFont, adding three properties:

  • normalFontName
  • boldFontName
  • italicFontName

Usage

Simply:

UIFont.normalFontName = "Courier"
UIFont.boldFontName = "Noteworthy-Bold"
UIFont.italicFontName = "HelveticaNeue-ThinItalic"

If you want to be notify (to update already displayed labels for example), you can observe these three notifications:

  • normalFontChanged
  • boldFontChanged
  • italicFontChanged
NotificationCenter.default.addObserver(self, selector: #selector(updateNormalFont), name: .normalFontChanged, object: nil)

Requirements

  • Xcode 9.0
  • Swift 4

Swift 3 support is available on the branch swift-3 on this repository.

Documentation

Full documentation is available on CocoaDocs. You can also install documentation locally using jazzy.

Author

Gaël Foppolo, [email protected]

Contribution and Maintenance

System font available on iOS is surely subject to possible change,
and when it does, this library should still work properly.
If you would like to help maintain or improve this library please feel free to do so.

License

UIDefaultFont is free software, and may be redistributed under the terms specified in the LICENSE file.