I have a program where I need to handle Edit>Copy when the first responder cannot.
I've added the following to my AppDelegate:
But Edit>Copy is greyed out on the menu unless a TextField has focus and it has text selected.
How do I get my copy function called when the text field has focus but does not have text selected (or any other case where the current view with focus cannot handle copy)?
I've added the following to my AppDelegate:
Code Block @IBAction @objc func copy(_ sender: Any?) { // My code here... }
But Edit>Copy is greyed out on the menu unless a TextField has focus and it has text selected.
How do I get my copy function called when the text field has focus but does not have text selected (or any other case where the current view with focus cannot handle copy)?