Enumerations
The following enumerations are available globally.
-
Enum that gets the attributes for each type of custom font and enables the use of customised typography by brand
See moreDeclaration
Swift
public enum CustomFontStyle : FontStyle
-
Representation of available themes in Design System.
Note
Supported Themes:- None
- AesopDark
- AesopLight
- AvonDark
- AvonLight
- NaturaDark
- NaturaLight
- TheBodyShopDark
- TheBodyShopLight
- ConsultoriaDeBelezaLight
- ConsultoriaDeBelezaDark
- CasaEestiloDark
- CasaEestiloLight
- AvonV2Dark
- AvonV2Light
Declaration
Swift
public enum AvailableTheme
-
AppBarColor represents the allowed color values for the AppBar Top component The component is configured using UINavigationController and UIViewController extensions.
See moreDeclaration
Swift
public enum AppBarColor
-
AppBarContentType represents the allowed content types for the AppBar Top component The component is configured using UINavigationController and UIViewController extensions.
See moreDeclaration
Swift
public enum AppBarContentType
-
TextFieldType is an enum that represents the possible types for a TextField. The chosen type indicates what kind of content will be received from the textField, and adjusts keyboard, autocorrection, capitalization and security for the textField input.
These are all types allowed for a TextField:
- text
- number
- name
- password
Declaration
Swift
public enum TextFieldType
-
NatBorderRadius is a enum that has access to radius properties from the Design System. This properties are used to set corner radius of view’s layer. According with the current Brand in the Design System this properties can change.
All properties returns a CGFloat.
Example of usage:
containerView.layer.cornerRadius = NatBorderRadius.small button.layer.cornerRadius = NatBorderRadius.circle(viewHeight: DSSizes.large)
Requires
It’s necessary to configure the Design System with a theme or fatalError will be raised.
DesignSystem().configure(with: AvailableTheme)
Declaration
Swift
public enum NatBorderRadius
-
NatOpacities is a enum that has access to alpha properties from the Design System. This properties are used to set alpha property from views. According with the current Brand in the Design System this properties can change.
All properties returns a CGFloat.
Example of usage:
containerView.alpha = NatOpacity.veryHigh profileView.alpha = NatOpacity.lower
Requires
It’s necessary to configure the Design System with a theme or fatalError will be raised.
DesignSystem().configure(with: AvailableTheme)
Declaration
Swift
public enum NatOpacities
-
NatSizes is a enum that has access to size properties from the Design System. This properties are used with constraints to handle view size of view objects. According with the current Brand in the Design System this properties can change.
All properties returns a CGFloat.
Example of usage:
containerView.widthAnchor.constraint(equalToConstant: NatSizes.large) containerView.heightAncor.constraint(equalToConstant: NatSizes.tiny)
Requires
It’s necessary to configure the Design System with a theme or fatalError will be raised.
DesignSystem().configure(with: AvailableTheme)
Declaration
Swift
public enum NatSizes
-
NatSpacing is a enum that has access to spacing properties from the Design System. This properties are used with constraints to handle view spaces between other views or view properties like safeAreaLayoutGuide. According with the current Brand in the Design System this spacing properties can change.
All properties returns a CGFloat.
Example of usage:
containerView.topAnchor.constraint(equalTo: view.topAnchor, constant: NatSpacing.tiny) containerView.bottomAnchor.constraint(equalTo: view.bottomAnchor, constant: NatSpacing.large)
Requires
It’s necessary to configure the Design System with a theme or fatalError will be raised.
DesignSystem().configure(with: AvailableTheme)
Declaration
Swift
public enum NatSpacing