Suggestion
protocol Suggestion
Used to display a list of suggestions, usually for something like autocomplete.
-
An id associated with the suggestion. Ex: placeId for Google Places API.
Declaration
Swift
var id: String { get }
-
Is the suggestion selected.
Declaration
Swift
var isSelected: Bool { get }
-
The primary suggestion text to display. Ex: “Address Line 1”.
Declaration
Swift
var mainText: String { get }
-
The secondary suggestion text to display. Ex: “City, State, Country”.
Declaration
Swift
var secondaryText: String? { get }
-
The image name usually retrieved from assets.
Declaration
Swift
var suggestionImageName: String? { get }