Contents

init(fetchRequest:transaction:)

Creates a fully configured fetch request that uses the specified transaction when updating results.

Declaration

@MainActor @preconcurrency init(fetchRequest: NSFetchRequest<Result>, transaction: Transaction)

Parameters

  • fetchRequest:

    An Nsfetchrequest instance that describes the search criteria for retrieving data from the persistent store.

  • transaction:

    A transaction to use for user interface changes that result from changes to the fetched results.

Discussion

Use this initializer if you need a fetch request with updates that affect the user interface based on a Transaction. Otherwise, use init(fetchRequest:animation:).

See Also

Creating a fully configured fetch request