NfcErrorAlertConfigurationBuilder¶
Builder class that helps creation of NfcTutorialConfiguration.
Public Methods¶
public init(defaultLanguage: String?)
Creates a configuration given the selected language, in string format.
-
Parameters:
- defaultLanguage: language to be used in the configuration.
public init(defaultLanguage: NfcConfiguration.Language)
Creates a configuration given the selected language, in NfcConfiguration.Language format.
-
Parameters:
- defaultLanguage: language to be used in the configuration.
@discardableResult
public func setBackgroundColor(_ color: UIColor?) -> NfcErrorAlertConfigurationBuilder
Sets the background color from desired UIColor.
-
Parameters:
- color: color for the background.
-
Returns:
- Builder itself.
@discardableResult
public func setBackgroundColor(_ color: [String : String]?) -> NfcErrorAlertConfigurationBuilder
Sets the background color from desired dictionary.
The dictionary must contain the following keys:
- "red": red channel, [0, 255].
- "green": green channel, [0, 255].
- "blue": blue channel, [0, 255].
- "alpha": alpha channel, [0, 1].
-
Parameters:
- color: color for the background.
-
Returns:
- Builder itself.
@discardableResult
public func setTitleText(_ text: String?) -> NfcErrorAlertConfigurationBuilder
Sets the title of the alert.
-
Parameters:
- text: text of the title.
-
Returns:
- Builder itself.
@discardableResult
public func setTitleTextColor(_ color: UIColor?) -> NfcErrorAlertConfigurationBuilder
Sets the title text color from desired UIColor.
-
Parameters:
- color: color for the title text.
-
Returns:
- Builder itself.
@discardableResult
public func setTitleTextColor(_ color: [String : String]?) -> NfcErrorAlertConfigurationBuilder
Sets the title text color from desired dictionary.
The dictionary must contain the following keys:
- "red": red channel, [0, 255].
- "green": green channel, [0, 255].
- "blue": blue channel, [0, 255].
- "alpha": alpha channel, [0, 1].
-
Parameters:
- color: color for the title text.
-
Returns:
- Builder itself.
@discardableResult
public func setCancelButtonTitleText(_ text: String?) -> NfcErrorAlertConfigurationBuilder
Sets the cancel title text.
-
Parameters:
- text: text of the title.
-
Returns:
- Builder itself.
@discardableResult
public func setCancelButtonTitleTextColor(_ color: UIColor?) -> NfcErrorAlertConfigurationBuilder
Sets the cancel button title text color from desired UIColor.
-
Parameters:
- color: color for the cancel button title text.
-
Returns:
- Builder itself.
@discardableResult
public func setCancelButtonTitleTextColor(_ color: [String : String]?) -> NfcErrorAlertConfigurationBuilder
Sets the cancel button title text color from desired dictionary.
The dictionary must contain the following keys:
- "red": red channel, [0, 255].
- "green": green channel, [0, 255].
- "blue": blue channel, [0, 255].
-
"alpha": alpha channel, [0, 1]. - Parameters:
- color: color for the cancel button title text.
-
Returns:
- Builder itself.
@discardableResult
public func setCancelButtonBackgroundColor(_ color: UIColor?) -> NfcErrorAlertConfigurationBuilder
Sets the cancel button background color from desired UIColor.
-
Parameters:
- color: color for the cancel button background.
-
Returns:
- Builder itself.
@discardableResult
public func setCancelButtonBackgroundColor(_ color: [String : String]?) -> NfcErrorAlertConfigurationBuilder
Sets the cancel button background color from desired dictionary.
The dictionary must contain the following keys:
- "red": red channel, [0, 255].
- "green": green channel, [0, 255].
- "blue": blue channel, [0, 255].
- "alpha": alpha channel, [0, 1].
-
Parameters:
- color: color for the cancel button background.
-
Returns:
- Builder itself.
@discardableResult
public func setInformativeText(_ text: String?) -> NfcErrorAlertConfigurationBuilder
Sets the informative text.
-
Parameters:
- text: text of the informative text.
-
Returns:
- Builder itself.
@discardableResult
public func setInformativeTextColor(_ color: UIColor?) -> NfcErrorAlertConfigurationBuilder
Sets the informative text color from desired UIColor.
-
Parameters:
- color: color for the informative title text.
-
Returns:
- Builder itself.
@discardableResult
public func setInformativeTextColor(_ color: [String : String]?) -> NfcErrorAlertConfigurationBuilder
Sets the informative text color from desired dictionary.
The dictionary must contain the following keys:
- "red": red channel, [0, 255].
- "green": green channel, [0, 255].
- "blue": blue channel, [0, 255].
- "alpha": alpha channel, [0, 1].
-
Parameters:
- color: color for the informative text.
-
Returns:
- Builder itself.
@discardableResult
public func setFontName(_ name: String?) -> NfcErrorAlertConfigurationBuilder
Sets the font name of the font used in all texts.
-
Parameters:
- name: name of the font to be used in all texts.
-
Returns:
- Builder itself.
public func build() -> NfcErrorAlertConfiguration
Builds the configuration builder and creates the error alert configuration.
-
Returns:
- Configuration of the error alert.