Make working with UIFont faster and less error-prone

Usage

This library is simply one extension to UIFont and one Font enum with a case for each standard installed font on iOS. No more muddling around searching for names of UIFont types and no more surprises at runtime if a font name was mistyped.

Instead of the String base constructor for UIFont:

let font = UIFont(name: "Arial-BoldItalicMT".size: 12.0)Copy the code

You can now simply start typing the name of the font enum and let code completion help you:

let font = UIFont(font:.arialBoldItalicMT.size: 12.0)Copy the code

Installation

CocoaPods

If you use CocoaPods to manage your dependencies, simply add UIFontComplete to your Podfile:

pod 'UIFontComplete'
Copy the code

Contribution and Maintenance

Fonts available on iOS are surely subject to possible change, and when they do the Font enum in this library will need to be updated as well. If you would like to help maintain or improve this library please feel free to do so.