results
The results that match the current query string.
Declaration
var results: CSSearchQuery.Results { get }Mentioned in
Discussion
Getting the value of this property starts the query automatically and begins the delivery of results. Typically, you get this property as part of a for..in loop and iterate over the responses, as shown in the following example:
var results: [String] = []
let query = CSSearchQuery(queryString: searchText, queryContext: queryContext)
for try await element in query.results {
if let title = element.item.attributeSet.title {
results.append(title)
}
}