0PricingLogin
SwiftUI Academy · Lesson

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

  1. The Core Data Stack
  2. Fetching with @FetchRequest
  3. Creating & Saving Entities
  4. Predicates & Sort Descriptors
← Back to SwiftUI Academy