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.
-
Creates an instance that only provides a main style.
Declaration
Swift
public init(mainStyle: StyleDefinition)Parameters
mainStyleMain 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
mainStylemain style used by the map.
darkStyledark style used by the map.
-
Creates an instance with main and dark versions of the map style.
Attention
Fonts need to be provided via the main application bundle.
- mainStyle: main style used by the map.
- darkStyle: dark style used by the map.
- bundle: bundle with resources (style files, sprites) and assets.
Declaration
Swift
public init(mainStyle: StyleDefinition, darkStyle: StyleDefinition, bundle: Bundle)Parameters
mainStylemain style used by the map.
darkStyledark style used by the map.
bundlebundle with resources (style files, sprites) and assets.
-
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
-
An operation to compare two instances of
StyleContainer. The comparison happens by comparing themainStyleanddarkStyleof each instance. If both are matching the others’, this operation returnstrue.Declaration
Swift
public static func == (lhs: StyleContainer, rhs: StyleContainer) -> BoolParameters
lhsA
StyleContainerto compare.rhsAnother
StyleContainerto compare.Return Value
a Boolean value indicating the equality of two instances of
StyleContainer.
TomTom SDK for iOS (0.53.1)
StyleContainer