Mac
Giving SwiftUI Item Windows Their Own UndoManager on macOS
When you open an item in its own dedicated macOS window using SwiftUI’s WindowGroup(_:id:for:), you often want that window—and any other window showing the same item—to share a single UndoManager tied to the model object rather than whatever default or scene-level undo manager AppKit and SwiftUI hand out. My earlier NSHostingView responder trick worked most Read more