SearchView
public class SearchView : BarContainerView
extension SearchView: SearchBarViewDelegate
extension SearchView: SearchSuggestionSelectionHandler
SearchView` provides the full functionality with all available search components in default layout.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Declaration
Swift
override public init(frame: CGRect) -
Initializes the view with the
SearchViewConfigurationobject.Declaration
Swift
public convenience init(withConfiguration configuration: SearchViewConfiguration)
-
An instance of the
SearchViewDelegate.Declaration
Swift
public weak var delegate: SearchViewDelegate? -
Configures the view with the
SearchViewConfigurationobject. This method should be used if theSearchViewis initialized via IB.Declaration
Swift
public func setup(withConfiguration configuration: SearchViewConfiguration) -
Clears the search results view and the search field.
Declaration
Swift
public func clear() -
Reloads data in the search results view and turns on editing in the search field.
Declaration
Swift
public func reload() -
Sets text on the search bar and triggers searching if text is not empty.
Declaration
Swift
public func setQuery(_ query: String?) -
Adds custom view under the search suggestions view.
Declaration
Swift
public func addCustomView(_ customView: UIView) -
Removes custom view.
Declaration
Swift
public func removeCustomView()
-
Declaration
Swift
public func onTextUpdated() -
Declaration
Swift
public func onFoundResults(_ results: [SearchResult]) -
Declaration
Swift
public func onSearchError(_ error: Error)
-
Declaration
Swift
public func onSuggestionSelected(suggestion: SearchSuggestion)
TomTom SDK for iOS (0.53.1)
SearchView