Hello,
My widgets use core data to display informations, so for placeholder I create an example object that's going be used only for that placeholder.
I only get a blank, why ?
If I set the task to nil the view appear correctly, because in that case my view display only a Text.
I looks like I can't use a NSManagedObject subclass for constructing my view
My widgets use core data to display informations, so for placeholder I create an example object that's going be used only for that placeholder.
I only get a blank, why ?
If I set the task to nil the view appear correctly, because in that case my view display only a Text.
I looks like I can't use a NSManagedObject subclass for constructing my view
Code Block func placeholder(with: Context) -> TaskEntry { let tmpContext = NSManagedObjectContext(concurrencyType: .mainQueueConcurrencyType) let task = Task(context: tmpContext) let subject = Subject(context: tmpContext) subject.title = "Oriented object Programming" task.subject = subject task.title = "learning abstract classes" task.deadline = Calendar.current.date(byAdding: .day, value: 1, to: Date()) return TaskEntry(date: Date(), task: nil) }