Configuration
public struct Configuration
General structure to configure MapboxSearchController UI and logic
-
Default configuration of MapboxSearchController.
Declaration
Swift
public init( allowsFeedbackUI: Bool = true, categoryDataProvider: CategoryDataProvider = DefaultCategoryDataProvider(), locationProvider: LocationProvider? = DefaultLocationProvider(), hideCategorySlots: Bool = false, style: Style = .default )Parameters
allowsFeedbackUIAllow to show feedback related UI
categoryDataProviderCustom dataProvider to change Categories elements
locationProviderlocation provider for both SearchEngine and Category SearchEngine. DefaultLocationProvider used as default value.
hideCategorySlotsHide horizontal set of category buttons (aka hot category buttons or category slots)
styleStyle to be used for Search UI elements.
-
Allow to show feedback related UI
Declaration
Swift
public var allowsFeedbackUI: Bool -
Custom dataProvider to change Categories elements
DefaultCategoryDataProviderused by default. SDK providesConstantCategoryDataProviderto pass constant custom categoriesDeclaration
Swift
public var categoryDataProvider: CategoryDataProvider -
Force to use your own location provider instead of
DefaultLocationProviderDeclaration
Swift
public var locationProvider: LocationProvider? -
Hide horizontal set of category buttons (aka hot category buttons or category slots)
Use
CategoryDataProvider.categorySlotsto provide custom categoriesDeclaration
Swift
public var hideCategorySlots: Bool -
Style to be used for Search UI elements. It’s possible to change style on the fly. Non-animatable.
Declaration
Swift
public var style: Style
Configuration Structure Reference