Style
public struct Style
Color-class based structure to generate your own UI style for Search UI elements.
Instead of color-per-element you can configure color classes like primaryTextColor or primaryAccentColor
Dark mode support should be implemented in the same Style instance as the light one.
Please use Asset Catalog colors or UIColor.init(dynamicProvider:)
-
init(primaryTextColor:primaryBackgroundColor:secondaryBackgroundColor:separatorColor:primaryAccentColor:primaryInactiveElementColor:panelShadowColor:panelHandlerColor:iconTintColor:activeSegmentTitleColor:)Make your own Style for SearchUI or use the default as
Style.default. Passnilto args to use default valueDeclaration
Swift
public init( primaryTextColor: UIColor? = nil, primaryBackgroundColor: UIColor? = nil, secondaryBackgroundColor: UIColor? = nil, separatorColor: UIColor? = nil, primaryAccentColor: UIColor? = nil, primaryInactiveElementColor: UIColor? = nil, panelShadowColor: UIColor? = nil, panelHandlerColor: UIColor? = nil, iconTintColor: UIColor? = nil, activeSegmentTitleColor: UIColor? = nil )Parameters
primaryTextColorColor of the most text-based elements
primaryBackgroundColorMain background color
secondaryBackgroundColorSearch Bar background, Category buttons background
separatorColorSeparator color for UITableViews
primaryAccentColorAccent color is used is
UIView.tintColor. By default is blue (mapbox style)primaryInactiveElementColorColor of non-active or non-important labels like placeholder in
SearchBaror address label inSearchSuggestionCellpanelShadowColorShadow color for
MapboxPanelControllerpanelHandlerColorColor of the small rectangle at the top of the
MapboxPanelControllericonTintColorTinting color for most icons like category icon or favorite record icon
activeSegmentTitleColorTitle color for active element in SegmentedControl
-
Default Mapbox style for SearchUI SDK
Declaration
Swift
public static let `default`: Style -
Color of the most text-based elements
Declaration
Swift
public var primaryTextColor: UIColor -
Main background color
Declaration
Swift
public var primaryBackgroundColor: UIColor -
Search Bar background, Category buttons background
Declaration
Swift
public var secondaryBackgroundColor: UIColor -
Separator color for UITableViews
Declaration
Swift
public var separatorColor: UIColor -
Accent color is used is
UIView.tintColor. By default is blue (mapbox style)Declaration
Swift
public var primaryAccentColor: UIColor -
Color of non-active or non-important labels like placeholder in
SearchBaror address label inSearchSuggestionCellDeclaration
Swift
public var primaryInactiveElementColor: UIColor -
Shadow color for
MapboxPanelControllerDeclaration
Swift
public var panelShadowColor: UIColor -
Color of the small rectangle at the top of the
MapboxPanelControllerDeclaration
Swift
public var panelHandlerColor: UIColor -
Tinting color for most icons like category icon or favorite record icon
Declaration
Swift
public var iconTintColor: UIColor -
Title color for active element in SegmentedControl
Note
To customise inactive title color useStyle.primaryInactiveElementColorDeclaration
Swift
public var activeSegmentTitleColor: UIColor
Style Structure Reference