StyleContainer

public struct StyleContainer
extension StyleContainer: Equatable

Holder struct for main and dark version of the style definition. If darkStyle is not provided, setting TomTomMap.styleMode has no effect.

Lifecycle

  • Creates an instance that only provides a main style.

    Declaration

    Swift

    public init(mainStyle: StyleDefinition)

    Parameters

    style

    main style used by the map.

  • Creates an instance with main and dark versions of the map style.

    Declaration

    Swift

    public init(mainStyle: StyleDefinition, darkStyle: StyleDefinition)

    Parameters

    mainStyle

    main style used by the map.

    darkStyle

    dark style used by the map.

  • Creates an instance with main and dark versions of the map style.

    Declaration

    Swift

    public init(mainStyle: StyleDefinition, darkStyle: StyleDefinition, bundle: Bundle)

    Parameters

    mainStyle

    main style used by the map.

    darkStyle

    dark style used by the map.

    bundle

    bundle with resources (style files, sprites) and assets.

Public

  • Defines a container containing a default light style and a default dark style.

    Declaration

    Swift

    public static let defaultStyle: StyleContainer
  • Defines a container containing a standard light driving style and a standard dark driving style.

    Declaration

    Swift

    public static let drivingStyle: StyleContainer
  • Defines a container with default vehicle restrictions in light and dark styles.

    Declaration

    Swift

    public static let restrictionsStyle: StyleContainer
  • Defines a container containing a satellite imagery style.

    Declaration

    Swift

    public static let satelliteStyle: StyleContainer

Equatable

  • Declaration

    Swift

    public static func == (lhs: StyleContainer, rhs: StyleContainer) -> Bool