Skip to content

Instantly share code, notes, and snippets.

@lalkrishna
lalkrishna / Fonts.swift
Created September 13, 2020 13:18
Make use of custom fonts with the help of extensions. Note: iOS not detecting `black` font weight for Montserrat font. Please comment if you know the solution for it.
// MARK: - Usage
func application(_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
UIFont.registerAllCustomFonts()
// Or You can add manually,
// https://developer.apple.com/documentation/uikit/text_display_and_fonts/adding_a_custom_font_to_your_app
return true
}
// Using Default family name