Is it possible to easily enable right click on a Mac Catalyst app within UIKitForMac?
Currently the following code works perfectly on left click, but nothing is called on right click:
button.addTarget(self, action: #selector(doSomething), for: .touchUpInside)
// Is called for left click but not for right click
@objc func doSomething(sender:UIButton, event:UIEvent) -> Bool {
https://developer.apple.com/design/human-interface-guidelines/ios/controls/context-menus/
This menu works by right clicking on Mac Catalyst
1. Add Iteraction
2. Add extension UIContextMenuIteractionDelegate