init(filterBy:sortBy:sectionBy:modelContext:isolation:)
Creates a new observer with individual filter and sort criteria, a String section key path, and a model context.
Declaration
convenience init(filterBy: Predicate<Element>? = nil, sortBy: [SortDescriptor<Element>]? = nil, sectionBy: KeyPath<Element, String>, modelContext: ModelContext, isolation: isolated (any Actor)? = #isolation) throwsParameters
- filterBy:
An optional predicate to filter the results.
- sortBy:
An optional array of sort descriptors to order the results.
- sectionBy:
A key path on the element type that returns the section name.
- modelContext:
The model context to fetch from and observe for changes.