EnterpriseDS Documentation

Enumeration DSFont​Rendering​Type

public enum DSFontRenderingType: String, CaseIterable  

A type that defines the rendering font that a generic Enterprise control should use.

A rendering font can be used to determine the appearance of various views. Where possible, a DSLabel is preferred over a UILabel when displaying text because some rendering fonts should be paired with specific colors and color is not part of a UIFont.

Preferred:

let label = DSLabel(renderingType: .headlineWhite)

NOT preferred:

let label = UILabel()

label.font = UIFont.headlineWhite
label.textColor = UIColor.grayscaleWhite
DSFontRenderingType DSFontRenderingType CaseIterable CaseIterable DSFontRenderingType->CaseIterable String String DSFontRenderingType->String

Conforms To

CaseIterable
String

Enumeration Cases

none

case none

Denotes that we will manually choose our font and color

large​Title​Emphasized

case largeTitleEmphasized

The largest font available

title1Emphasized

case title1Emphasized

Emphasized Title 1 text

title2

case title2

Title 2 text

title2Emphasized

case title2Emphasized

Emphasized Title 2 text

title2White

case title2White

Title 2 white text

title3

case title3

Title 3 text

headline

case headline

Headline text

headline​White

case headlineWhite

Headline white text

headline​Disabled

case headlineDisabled

Headline disabled text

body

case body

Body text

body​Deemphasized

case bodyDeemphasized

Deemphasized body text

body​Link​Emphasized

case bodyLinkEmphasized

Emphasized body link text

callout

case callout

Callout text

subhead

case subhead

Subhead text

subhead​Emphasized

case subheadEmphasized

Emphasized subhead text

subhead​Deemphasized

case subheadDeemphasized

Deemphasized subhead text

footnote

case footnote

Footnote text

footnote​Emphasized

case footnoteEmphasized

Emphasized footnote text

footnote​Deemphasized

case footnoteDeemphasized

Deemphasized footnote text

caption1

case caption1

Caption 1 text

caption1Emphasized

case caption1Emphasized

Emphasized caption 1 text

caption1Deemphasized

case caption1Deemphasized

Deemphasized caption 1 text

Properties

name

public var name: String  

Returns an English name of the rendering font. Useful mostly for debugging.

font

public var font: UIFont  

Returns an associated UIFont for the rendering font.

color

public var color: UIColor  

Returns an associated UIColor for the rendering font.