UIFont
class UIFont : NSObject, NSCopying
-
Makes the given font scalable.
Declaration
Swift
public class func scaledFont(for font: UIFont) -> UIFont
Parameters
font
The font to make scalable.
Return Value
A scalable font object.
-
Creates a scalable font with the given font name and reference font size.
Declaration
Swift
public class func scaledFont(name fontName: String, size fontSize: CGFloat) -> UIFont?
Parameters
fontName
The name of the font that should be used.
fontSize
The reference font size to use.
Return Value
A scalable font object.
-
Creates a scalable system font with a given reference font size.
fontSize: The reference font size to use.
Declaration
Swift
public class func scaledSystemFont(ofSize fontSize: CGFloat) -> UIFont
Return Value
A scalable font object.
-
Creates a scalable bold system font with a given reference font size.
fontSize: The reference font size to use.
Declaration
Swift
public class func scaledBoldSystemFont(ofSize fontSize: CGFloat) -> UIFont
Return Value
A scalable font object.
-
Creates a scalable italic system font with a given reference font size.
fontSize: The reference font size to use.
Declaration
Swift
public class func scaledItalicSystemFont(ofSize fontSize: CGFloat) -> UIFont
Return Value
A scalable font object.