UIFont
extension UIFont
-
Get
Fioripreferred font based on a givenUIFontTextStyle. This is a scaled font.Supported attributes:
Regular,Italic,Light,Bold,BoldItalic,Black,Condensed,CondensedBold.Declaration
Swift
public class func preferredFioriFont(forTextStyle textStyle: UIFontTextStyle, weight: UIFont.Weight = .regular, isItalic: Bool = false, isCondensed: Bool = false) -> UIFontParameters
textStyleThe
UIFontTextStyletext styleweightThe weight of the font.
isItalicThe italic version of the font.
isConsensedThe condensed version of the font.
Return Value
The font object with specified attributes.
-
Get
Fioripreferred font with a given size. Not a scaled font.Supported attributes:
Regular,Italic,Light,Bold,BoldItalic,Black,Condensed,CondensedBold.Declaration
Swift
public class func preferredFioriFont(fixedSize size: CGFloat, weight: UIFont.Weight = .regular, isItalic: Bool = false, isCondensed: Bool = false) -> UIFontParameters
textStyleThe
UIFontTextStyletext styleweightThe weight of the font.
isItalicThe italic version of the font.
isConsensedThe condensed version of the font.
Return Value
The font object with fixed size.
-
Register Fiori fonts in the app.
Call
UIFont.registerFioriFonts()in AppDelegate to load all the fiori fonts into your app. If it is not called,UIFont.preferredFioriFont(forTextStyle:)will return system font instead.Declaration
Swift
public static func registerFioriFonts() -
Declaration
Swift
extension UIFont.TextStyleextension UIFont.TextStyle: CustomStringConvertibleextension UIFont.TextStyle: CaseIterable -
Declaration
Swift
extension UIFont.Weight: CaseIterable, CustomStringConvertible