After trying all sorts of minimal working examples (and failing) just to get one RecorderCocoa to show up, can I humbly request for a simple "helloworld" level MWE with these settings?
What I've tried so far is to
Initialize the project as shown above
Set the ViewController.swift file to
import Cocoa
import KeyboardShortcuts
extension KeyboardShortcuts.Name {
static let toggleUnicornMode = Self("toggleUnicornMode")
}
class ViewController: NSViewController {
@IBOutlet var button: NSView!
let recorder = KeyboardShortcuts.RecorderCocoa(for: .toggleUnicornMode)
override func viewDidLoad() {
super.viewDidLoad()
button.addSubview(recorder)
}
}
But nothing shows up. Any help is appreciated. Thanks.
After trying all sorts of minimal working examples (and failing) just to get one
RecorderCocoa
to show up, can I humbly request for a simple "helloworld" level MWE with these settings?What I've tried so far is to
ViewController.swift
file toBut nothing shows up. Any help is appreciated. Thanks.