Post

Replies

Boosts

Views

Activity

Reply to Enabling undo with multi-model schema
do { let container = try ModelContainer(for: schema, configurations: [modelConfiguration]) container.mainContext.undoManager = UndoManager() return container } catch { fatalError("Could not create ModelContainer: (error)") } when you need to undo @Environment(\.modelContext) var modelContext modelContext.undoManager?.undo()
Feb ’24