Skip to content

NfcKeysAlertConfigurationBuilder

Builder class that helps creation of NfcKeysAlertConfiguration.

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?) -> NfcKeysAlertConfigurationBuilder

Sets the background color from desired UIColor.

  • Parameters:

    • color: color for the background.
  • Returns:

    • Builder itself.
@discardableResult
public func setBackgroundColor(_ color: [String : String]?) -> NfcKeysAlertConfigurationBuilder

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?) -> NfcKeysAlertConfigurationBuilder

Sets the title text of the alert.

  • Parameters:

    • text: text of the title.
  • Returns:

    • Builder itself.
@discardableResult
public func setTitleTextColor(_ color: UIColor?) -> NfcKeysAlertConfigurationBuilder

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]?) -> NfcKeysAlertConfigurationBuilder

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 setDocumentNumberText(_ text: String?) -> NfcKeysAlertConfigurationBuilder

Sets the number of the document text.

  • Parameters:

    • text: text of the number of the document.
  • Returns:

    • Builder itself.
@discardableResult
public func setDocumentNumberTextColor(_ color: UIColor?) -> NfcKeysAlertConfigurationBuilder

Sets the number of the document text color from desired UIColor.

  • Parameters:

    • color: color for the number of the document title text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDocumentNumberTextColor(_ color: [String : String]?) -> NfcKeysAlertConfigurationBuilder

Sets the document 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 document title text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfBirthText(_ text: String?) -> NfcKeysAlertConfigurationBuilder

Sets the date of birth text.

  • Parameters:

    • text: text of the date of birth.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfBirthTextColor(_ color: UIColor?) -> NfcKeysAlertConfigurationBuilder

Sets the date of birth text color from desired UIColor.

  • Parameters:

    • color: color for the date of birth text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfBirthTextColor(_ color: [String : String]?) -> NfcKeysAlertConfigurationBuilder

Sets the date of birth 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 date of birth text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfBirthDayText(_ text: String?) -> NfcKeysAlertConfigurationBuilder

Sets the day of the date of birth text.

  • Parameters:

    • text: text of the day of the date of birth text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfBirthDayTextColor(_ color: UIColor?) -> NfcKeysAlertConfigurationBuilder

Sets the day of the date of birth text color from desired UIColor.

  • Parameters:

    • color: color for the day of the date of birth text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfBirthDayTextColor(_ color: [String : String]?) -> NfcKeysAlertConfigurationBuilder

Sets the day of the date of birth 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 day of the date of birth text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfBirthMonthText(_ text: String?) -> NfcKeysAlertConfigurationBuilder

Sets the month of the date of birth text.

  • Parameters:

    • text: text of the month of the date of birth.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfBirthMonthTextColor(_ color: UIColor?) -> NfcKeysAlertConfigurationBuilder

Sets the month of the date of birth text color from desired UIColor.

  • Parameters:

    • color: color for the month of the date of birth text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfBirthMonthTextColor(_ color: [String : String]?) -> NfcKeysAlertConfigurationBuilder

Sets the month of the date of birth 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 month of the date of birth text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfBirthYearText(_ text: String?) -> NfcKeysAlertConfigurationBuilder

Sets the year of the date of birth text.

  • Parameters:

    • text: text of the year of the date of birth.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfBirthYearTextColor(_ color: UIColor?) -> NfcKeysAlertConfigurationBuilder

Sets the year of the date of birth text color from desired UIColor.

  • Parameters:

    • color: color for the year of the date of birth text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfBirthYearTextColor(_ color: [String : String]?) -> NfcKeysAlertConfigurationBuilder

Sets the year of the date of birth 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 year of the date of birth text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfExpiryText(_ text: String?) -> NfcKeysAlertConfigurationBuilder

Sets the date of expiry text.

  • Parameters:

    • text: text of the date of expiry.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfExpiryTextColor(_ color: UIColor?) -> NfcKeysAlertConfigurationBuilder

Sets the date of expiry text color from desired UIColor.

  • Parameters:

    • color: color for the date of expiry text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfExpiryTextColor(_ color: [String : String]?) -> NfcKeysAlertConfigurationBuilder

Sets the date of expiry 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 date of expiry text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfExpiryDayText(_ text: String?) -> NfcKeysAlertConfigurationBuilder

Sets the day of the date of expiry text.

  • Parameters:

    • text: text of the day of the date of expiry.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfExpiryDayTextColor(_ color: UIColor?) -> NfcKeysAlertConfigurationBuilder

Sets the day of the date of expiry text color from desired UIColor.

  • Parameters:

    • color: color for the day of the date of expiry text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfExpiryDayTextColor(_ color: [String : String]?) -> NfcKeysAlertConfigurationBuilder

Sets the day of the date of expiry 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 day of the date of expiry text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfExpiryMonthText(_ text: String?) -> NfcKeysAlertConfigurationBuilder

Sets the month of the date of expiry text.

  • Parameters:

    • text: text of the month of the date of expiry.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfExpiryMonthTextColor(_ color: UIColor?) -> NfcKeysAlertConfigurationBuilder

Sets the month of the date of expiry text color from desired UIColor.

  • Parameters:

    • color: color for the month of the date of expiry text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfExpiryMonthTextColor(_ color: [String : String]?) -> NfcKeysAlertConfigurationBuilder

Sets the month of the date of expiry 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 month of the date of expiry text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfExpiryYearText(_ text: String?) -> NfcKeysAlertConfigurationBuilder

Sets the year of the date of expiry text.

  • Parameters:

    • text: text of the year of the date of expiry.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfExpiryYearTextColor(_ color: UIColor?) -> NfcKeysAlertConfigurationBuilder

Sets the year of the date of expiry text color from desired UIColor.

  • Parameters:

    • color: color for the year of the date of expiry text.
  • Returns:

    • Builder itself.
@discardableResult
public func setDateOfExpiryYearTextColor(_ color: [String : String]?) -> NfcKeysAlertConfigurationBuilder

Sets the year of the date of expiry 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 year of the date of expiry text.
  • Returns:

    • Builder itself.
@discardableResult
public func setScanButtonBackgroundColor(_ color: UIColor?) -> NfcKeysAlertConfigurationBuilder

Sets the scan button background color from desired UIColor.

  • Parameters:

    • color: color for the scan button background color.
  • Returns:

    • Builder itself.
@discardableResult
public func setScanButtonBackgroundColor(_ color: [String : String]?) -> NfcKeysAlertConfigurationBuilder

Sets the scan 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 scan button background.
  • Returns:

    • Builder itself.
@discardableResult
public func setScanButtonTitleText(_ text: String?) -> NfcKeysAlertConfigurationBuilder

Sets the scan button title text.

  • Parameters:

    • text: text of scan button title.
  • Returns:

    • Builder itself.
@discardableResult
public func setScanButtonTitleTextColor(_ color: UIColor?) -> NfcKeysAlertConfigurationBuilder

Sets the scan button title text color from desired UIColor.

  • Parameters:

    • color: color for the scan button title text.
  • Returns:

    • Builder itself.
@discardableResult
public func setScanButtonTitleTextColor(_ color: [String : String]?) -> NfcKeysAlertConfigurationBuilder

Sets the scan 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 scan button title text.
  • Returns:

    • Builder itself.
@discardableResult
public func setFontName(_ text: String?) -> NfcKeysAlertConfigurationBuilder

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() -> NfcKeysAlertConfiguration

Builds the configuration builder and creates the error alert configuration.

  • Returns:

    • Configuration of the error alert.