Initializer

init(fetchRequest:sectionIdentifier:transaction:)

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

Declaration 宣言

init(fetchRequest: NSFetchRequest<Result>, sectionIdentifier: KeyPath<Result, SectionIdentifier>, transaction: Transaction)
Available when SectionIdentifier conforms to Hashable and Result conforms to NSFetchRequestResult.

Parameters パラメータ

fetchRequest

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

sectionIdentifier

A key path that SwiftUI applies to the Result type to get an object’s section identifier.

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:sectionIdentifier:animation:).

See Also 参照

Creating a Fully Configured Fetch Request