AI-generated Key Takeaways
-
SearchSuggestionsView
is a SwiftUI View designed to display search suggestions within your iOS app, available since iOS 14. -
This view requires a
SearchSuggestions
object to provide the suggestions and can be further customized usingSearchSuggestionsViewOptions
. -
The
body
property represents the content and appearance of the search suggestions view.
SearchSuggestionsView
@available(iOS, introduced: 14)
@MainActor
struct SearchSuggestionsView
A SwiftUI View to display search suggestions.
-
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.property
property.Declaration
Swift
@available(iOS, introduced: 14) typealias Body = some View
-
Creates a SearchSuggestionsView.
Declaration
Swift
@available(iOS, introduced: 14) @MainActor init(suggestions: SearchSuggestions?, options: SearchSuggestionsViewOptions = SearchSuggestionsViewOptions())