SearchMediaSupportable
@MainActor
@preconcurrency
protocol SearchMediaSupportable : ViewA protocol for views that support search media options.
-
Extension methodsearchMediaOptions(_:completion:)
Adds search media options to a place view.
When this is set, one or more searches through a place’s media may be performed, depending on the type of view that this modifier is applied on (e.g. for
AdvancedPlaceSearchViewandAdvancedPlaceListView, a search will be performed for each place in the list).If the search was a success, and there were results, they will be displayed for the place. In all other cases, the default content will be displayed instead as a fallback (if possible).
Declaration
Swift
@MainActor func searchMediaOptions(_ options: SearchMediaOptions?, completion: (@Sendable ([Result<SearchMediaSummary, PlacesError>]) -> Void)? = nil) -> SelfParameters
optionsThe search options for the place’s media.
completionThe handler to be called when the searches are completed.
Return Value
The view with the closure added.