AdvancedPlaceListView
@MainActor
struct AdvancedPlaceListViewextension AdvancedPlaceListView : SearchMediaSupportable, Sendable, SendableMetatype, ViewA premium view that displays a unique list of place details results.
-
The type of view representing the body of this view.
When you create a custom view, Swift infers this type from your implementation of the required
View/body-swift.propertyproperty.Declaration
Swift
typealias Body = some View -
All of the content that can be displayed for the view.
Declaration
Swift
@MainActor static let allContent: Set<AdvancedPlaceListContent> -
The content and behavior of the view.
When you implement a custom view, you must implement a computed
bodyproperty to provide the content for your view. Return a view that’s composed of built-in views that SwiftUI provides, plus other composite views that you’ve already defined:struct MyView: View { var body: some View { Text("Hello, World!") } }For more information about composing views and a view hierarchy, see doc:Declaring-a-Custom-View.
Declaration
Swift
@MainActor @preconcurrency var body: some View { get } -
Adds a closure to be called when place actions are requested for the corner area of the place view.
Actions are presented starting from the corner and extend inwards.
Declaration
Swift
@MainActor func cornerActions(actionsProvider: @escaping (Place) -> [CornerPlaceActionElement]) -> AdvancedPlaceListViewParameters
actionsProviderA closure that returns a list of
CornerPlaceActionElements to be displayed for the specified location. An empty array should be returned if no elements are desired.Return Value
The
AdvancedPlaceListViewwith the closure added. -
Initializes a new instance of
AdvancedPlaceListView.Declaration
Swift
@MainActor init(orientation: PlaceViewOrientation = .vertical, queries: Binding<[PlaceDetailsQuery]>, configuration: AdvancedPlaceListConfiguration)Parameters
orientationThe orientation of the view.
queriesThe queries for the view, which are used when fetching the place details. There is a limit of 20 queries, and any additional queries will be ignored.
configurationThe configuration settings for the view.
Return Value
An instance of
AdvancedPlaceListView. -
Adds a closure to be called when place actions are requested for the main body area of the place view.
Declaration
Swift
@MainActor func mainActions(actionsProvider: @escaping (Place) -> [MainPlaceActionElement]) -> AdvancedPlaceListViewParameters
actionsProviderA closure that returns a list of
MainPlaceActionElements to be displayed for the specified location. An empty array should be returned if no elements are desired.Return Value
The
AdvancedPlaceListViewwith the closure added. -
Adds a callback to be called when the place results are loaded.
Declaration
Swift
@MainActor func onLoad(_ callback: @escaping ([Result<Place, PlacesError>]) -> Void) -> AdvancedPlaceListViewParameters
callbackThe callback to be called when the place results are loaded.
Return Value
The
AdvancedPlaceListViewwith the callback added. -
Adds a callback to be called when a place is selected.
Declaration
Swift
@MainActor func onPlaceSelected(_ callback: @escaping (Place) -> Void) -> AdvancedPlaceListViewParameters
callbackThe callback to be called when a place is selected.
Return Value
The
AdvancedPlaceListViewwith the callback added. -
A set of standard content to be displayed for the view.
Declaration
Swift
@MainActor static let standardContent: Set<AdvancedPlaceListContent>