Enumerations
The following enumerations are available globally.
-
Type that defines the rendering font that a DSButton control should use.
A rendering font, when set, will affect the title and background color of the DSButton based on its state. It can be changed at any time and will reflect accurately.
See morelet button = DSButton(renderingType: .primary) button.imageLocation = .trailing
Declaration
Swift
public enum DSButtonImageLocationType : String, CaseIterable
-
Type that defines the rendering font that a DSButton control should use.
A rendering font, when set, will affect the title and background color of the DSButton based on its state. It can be changed at any time and will reflect accurately.
See morelet button = DSButton(renderingType: .primary)
Declaration
Swift
public enum DSButtonRenderingType : String, CaseIterable
-
The various brands of credit card.
See moreDeclaration
Swift
public enum DSCreditCardType
-
Type that defines the rendering font that a generic Anatomy 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:
See morelet label = UILabel() label.font = UIFont.headlineWhite label.textColor = UIColor.grayscaleWhite
Declaration
Swift
public enum DSFontRenderingType : String, CaseIterable
-
Type that defines the rendering size of a DSIcon.
There are several standard sizes that a DSIcon can display as.
See morelet icon = DSIcon(renderingType: .beaker) icon.renderingSize = .size32
Declaration
Swift
public enum DSIconRenderingSize : Int
-
Type that defines the rendering image that defined the appearance of DSIcon.
The icon is representative of the image that will display. These images are not tinted, but DSIcon will define a standard tint. Some icons should not be tinted, including .case alert_warning.
Preferred:
let icon = DSIcon(renderingType: .beaker)
Not preferred:
See morelet imageView = UIImageView() imageView.image = UIImage(named: "anatomy-icon-beaker") imageView.tintColor = .primaryBrandViolet
Declaration
Swift
public enum DSIconRenderingType : String, CaseIterable
-
Type that defines the rendering size of an DSIllustration.
There are several standard sizes that an DSIllustration can display as.
See morelet illustration = Illustration() illustration.renderingSize = .size64
Declaration
Swift
public enum DSIllustrationRenderingSize : Int
-
Type that defines the rendering image that defined the appearance of DSIllustration.
The illustration is representative of the image that will display. These images are not tintable and include multiple colors.
Preferred:
let illustration = DSIllustration(renderingType: .apple)
Not preferred:
See morelet imageView = UIImageView() imageView.image = UIImage(named: "anatomy-illustration-apple")
Declaration
Swift
public enum DSIllustrationRenderingType : String, CaseIterable
-
Type that defines a validation status. If the validation is invalid, one offending DSValidationRule is part of the value.
See moreDeclaration
Swift
public enum DSTextFieldValidationState