If I use the following code, the project works normal.
let listRequest = FetchRequest<ReminderList>(entity: ReminderList.entity(), sortDescriptors: [NSSortDescriptor(key: "title", ascending: true)])
var lists: FetchedResults<ReminderList> {
return listRequest.wrappedValue
}
But if I put lists variable in init() method (the following), the data not load. I don't know why.
let listRequest = FetchRequest<ReminderList>(entity: ReminderList.entity(), sortDescriptors: [NSSortDescriptor(key: "title", ascending: true)])
var lists: FetchResults<ReminderList>
init() {
self.lists = listRequest.wrappedValue
}