Contents

init(_:animation:)

Create a query with a SwiftData fetch descriptor.

Declaration

@MainActor @preconcurrency init(_ descriptor: FetchDescriptor<Element>, animation: Animation) where Result == [Element]

Parameters

  • descriptor:

    A SwiftData.FetchDescriptor.

  • animation:

    The animation to use for user interface changes that result from changes to the fetched results.

See Also

Creating a query