CustomProperties

public struct CustomProperties : Equatable

A container class for key-value custom properties

  • Creates a new CustomProperties instance.

    Declaration

    Swift

    public init()
  • Removes the given key and its associated value.

    Declaration

    Swift

    @discardableResult
    public mutating func removeValue(forKey key: String) -> AnyHashable?

    Parameters

    key

    The key to remove along with its associated value.

    Return Value

    The value that was removed, or nil if the key was not present.

  • Adds a Bool property.

    Declaration

    Swift

    public mutating func addBool(key: String, value: Bool)

    Parameters

    key

    The key of the property.

    value

    The value of the property.

  • Adds an Int property.

    Declaration

    Swift

    public mutating func addInt(key: String, value: Int)

    Parameters

    key

    The key of the property.

    value

    The value of the property.

  • Adds a Float property.

    Declaration

    Swift

    public mutating func addFloat(key: String, value: Float)

    Parameters

    key

    The key of the property.

    value

    The value of the property.

  • Adds a Double property.

    Declaration

    Swift

    public mutating func addDouble(key: String, value: Double)

    Parameters

    key

    The key of the property.

    value

    The value of the property.

  • Adds a String property.

    Declaration

    Swift

    public mutating func addString(key: String, value: String)

    Parameters

    key

    The key of the property.

    value

    The value of the property.

  • Adds an Array of Strings property.

    Declaration

    Swift

    public mutating func addArray(key: String, value: [String])

    Parameters

    key

    The key of the property.

    value

    The value of the property.

  • Returns all keys and its associated values.

    Declaration

    Swift

    public func getAll() -> [String : AnyHashable]

    Return Value

    A dictionary with all the keys and its associated values