Change
struct SheetMusicView_Previews: PreviewProvider {
static var previews: some View {
SheetMusicView()
.environment(\.managedObjectContext, PersistenceController.shared.container.viewContext)
}
}
1
2
3
4
5
6
7
2
3
4
5
6
7
To
struct SheetMusicView_Previews: PreviewProvider {
static var previews: some View {
let context = PersistenceController.shared.container.viewContext
return SheetMusicView()
.environment(\.managedObjectContext, context)
}
}
1
2
3
4
5
6
7
2
3
4
5
6
7