One Logo Pool Ball
UIKit · IOS API REFERENCE

UIFont

class · iOS 2.0+ · SDK 27.1

class UIFont

Members (28)

static · iOS 2.0+

boldSystemFont

TypeScript
static boldSystemFont(fontSize: number): UIFont
Swift declaration
class func boldSystemFont(ofSize fontSize: CGFloat) -> UIFont
static · iOS 2.0+

fontNames

TypeScript
static fontNames(familyName: string): Array<string>
Swift declaration
class func fontNames(forFamilyName familyName: String) -> [String]
init · iOS 7.0+

init

TypeScript
static initDescriptorSize(descriptor: UIFontDescriptor, pointSize: number): UIFont
Swift declaration
init(descriptor: UIFontDescriptor, size pointSize: CGFloat)
init · iOS 2.0+

init

TypeScript
static initNameSize(fontName: string, fontSize: number): (UIFont) | null
Swift declaration
init?(name fontName: String, size fontSize: CGFloat)
static · iOS 2.0+

italicSystemFont

TypeScript
static italicSystemFont(fontSize: number): UIFont
Swift declaration
class func italicSystemFont(ofSize fontSize: CGFloat) -> UIFont
static · iOS 9.0+

monospacedDigitSystemFont

TypeScript
static monospacedDigitSystemFont(fontSize: number, weight: UIFont_Weight): UIFont
Swift declaration
class func monospacedDigitSystemFont(ofSize fontSize: CGFloat, weight: UIFont.Weight) -> UIFont
static · iOS 13.0+

monospacedSystemFont

TypeScript
static monospacedSystemFont(fontSize: number, weight: UIFont_Weight): UIFont
Swift declaration
class func monospacedSystemFont(ofSize fontSize: CGFloat, weight: UIFont.Weight) -> UIFont
static · iOS 7.0+

preferredFont

TypeScript
static preferredFontForTextStyle(style: UIFont_TextStyle): UIFont
Swift declaration
class func preferredFont(forTextStyle style: UIFont.TextStyle) -> UIFont
static · iOS 10.0+

preferredFont

TypeScript
static preferredFontForTextStyleCompatibleWith(style: UIFont_TextStyle, traitCollection?: (UITraitCollection) | null): UIFont
Swift declaration
class func preferredFont(forTextStyle style: UIFont.TextStyle, compatibleWith traitCollection: UITraitCollection?) -> UIFont
static · iOS 2.0+

systemFont

TypeScript
static systemFontOfSize(fontSize: number): UIFont
Swift declaration
class func systemFont(ofSize fontSize: CGFloat) -> UIFont
static · iOS 8.2+

systemFont

TypeScript
static systemFontOfSizeWeight(fontSize: number, weight: UIFont_Weight): UIFont
Swift declaration
class func systemFont(ofSize fontSize: CGFloat, weight: UIFont.Weight) -> UIFont
static · iOS 16.0+

systemFont

TypeScript
static systemFontOfSizeWeightWidth(fontSize: number, weight: UIFont_Weight, width: UIFont_Width): UIFont
Swift declaration
class func systemFont(ofSize fontSize: CGFloat, weight: UIFont.Weight, width: UIFont.Width) -> UIFont
get

buttonFontSize

TypeScript
static get buttonFontSize(): number
Swift declaration
class var buttonFontSize: CGFloat { get }
get · iOS 2.0+

familyNames

TypeScript
static get familyNames(): Array<string>
Swift declaration
class var familyNames: [String] { get }
get

labelFontSize

TypeScript
static get labelFontSize(): number
Swift declaration
class var labelFontSize: CGFloat { get }
get

smallSystemFontSize

TypeScript
static get smallSystemFontSize(): number
Swift declaration
class var smallSystemFontSize: CGFloat { get }
get

systemFontSize

TypeScript
static get systemFontSize(): number
Swift declaration
class var systemFontSize: CGFloat { get }
method · iOS 2.0+

withSize

TypeScript
withSize(fontSize: number): UIFont
Swift declaration
func withSize(_ fontSize: CGFloat) -> UIFont
get · iOS 2.0+

ascender

TypeScript
get ascender(): number
Swift declaration
var ascender: CGFloat { get }
get · iOS 2.0+

capHeight

TypeScript
get capHeight(): number
Swift declaration
var capHeight: CGFloat { get }
get · iOS 2.0+

descender

TypeScript
get descender(): number
Swift declaration
var descender: CGFloat { get }
get · iOS 2.0+

familyName

TypeScript
get familyName(): string
Swift declaration
var familyName: String { get }
get · iOS 7.0+

fontDescriptor

TypeScript
get fontDescriptor(): UIFontDescriptor
Swift declaration
var fontDescriptor: UIFontDescriptor { get }
get · iOS 2.0+

fontName

TypeScript
get fontName(): string
Swift declaration
var fontName: String { get }
get · iOS 2.0+

leading

TypeScript
get leading(): number
Swift declaration
var leading: CGFloat { get }
get · iOS 4.0+

lineHeight

TypeScript
get lineHeight(): number
Swift declaration
var lineHeight: CGFloat { get }
get · iOS 2.0+

pointSize

TypeScript
get pointSize(): number
Swift declaration
var pointSize: CGFloat { get }
get · iOS 2.0+

xHeight

TypeScript
get xHeight(): number
Swift declaration
var xHeight: CGFloat { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

UIFont.init()

inherited init: cannot prove legal (class declares 2 custom initializers)

All UIKit types →