AI-generated Key Takeaways
-
SearchSuggestionsViewis a SwiftUI View designed to display search suggestions within your iOS app, available since iOS 14. -
This view requires a
SearchSuggestionsobject to provide the suggestions and can be further customized usingSearchSuggestionsViewOptions. -
The
bodyproperty represents the content and appearance of the search suggestions view.
SearchSuggestionsView
@available(iOS, introduced: 14)
@MainActor
struct SearchSuggestionsViewA 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.propertyproperty.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())