UIFont
extension UIFont
-
Undocumented
See moreDeclaration
Swift
public enum Extension -
Registers a font for use in the app.
Declaration
Swift
@discardableResult public static func register(name: String, fileExtension: Extension, in bundle: Bundle) -> BoolParameters
nameThe name of the font family.
fileExtensionThe extension of the font file.
bundleThe bundle in which the font file is located.
Return Value
Returns true if registering font is successful.
-
Registers a font for use in the app.
Declaration
Swift
@discardableResult public static func register(filePath: String) -> BoolParameters
filePathThe file path of font.
Return Value
Returns true if registering a font is successful.
-
Gets a custom font after registering if needed.
ofSize: The size (in points) to which the font is scaled. This value must be greater than 0.0.
Declaration
Swift
public static func customFont(filePath: String, ofSize fontSize: CGFloat) -> UIFont?Parameters
filePathThe file path of font.
Return Value
A font object of the specified font file path and size.
View on GitHub
Install in Dash
UIFont Extension Reference