Fetching with @FetchRequest
Load managed objects directly into views.
Reading Records in Views
To show saved data, a SwiftUI view needs to fetch it from Core Data and re-render whenever that data changes.
The @FetchRequest Wrapper
The @FetchRequest property wrapper runs a query for an entity and keeps the results live and current for you.
@FetchRequest(sortDescriptors: []) var tasks: FetchedResults<Task>All lessons in this course
- The Core Data Stack
- Fetching with @FetchRequest
- Creating & Saving Entities
- Predicates & Sort Descriptors