SearchBarView
public class SearchBarView : UIView
extension SearchBarView: UITextFieldDelegate
SearchBarView provides input for the search phrase and returns results from the TomTomSDKSearch API.
Important
This is a Public Preview API. It may be changed or removed at any time.-
Creates an instance of the
SearchBarView
using a configuration object.Declaration
Swift
public convenience init(withConfiguration configuration: SearchBarViewConfiguration)
Parameters
withConfiguration
SearchBarViewConfiguration
instance containing properties required by the search bar.
-
Delegate that notifies about search results, text changes and search errors.
Declaration
Swift
public weak var delegate: SearchBarViewDelegate?
-
Property indicating if the text in search bar is empty or not.
Declaration
Swift
public var hasInput: Bool { get }
-
The text in the search bar that triggers searching
Declaration
Swift
public var searchQuery: String? { get set }
-
Configures an instance of SearchBarView using a configuration object. This method should be used if the SearchBarView is initialized via IB.
Declaration
Swift
public func setup(withConfiguration configuration: SearchBarViewConfiguration)
Parameters
withConfiguration
SearchBarViewConfiguration
instance containing properties required by the search bar. -
Starts editing and opens the keyboard.
Declaration
Swift
@discardableResult override public func becomeFirstResponder() -> Bool