Posts
Its so trivial to get key modifiers (command, option, etc) in Gesture Recognizers both in UIKit and AppKit that is puzzling to me why Apple didn't include them in SwiftUI's `DragGesture`. It's something you can do in about 10 minutes by creating a custom gesture recognizer representable.
The @ActiveViewObject property wrapper above is actually another hack I had to come up with because, for some wild reason, @FocusedValue/ .focusedSceneValue would cause memory leaks that I could not get hid of.
Another day another hacky solution to go around SwiftUI limitations on macOS.
I wanted to be able to use the "Select All" item from the app menu without having to replace the built items that SwiftUI provides.
I was pretty sure that implementing a `selectAll` method in my AppDelegate *should* work but it just would not happen.
Turns out you must also make the app delegate conform to `NSStandardKeyBindingResponding` *which doesn't even have this method in it!!*