in macOS, I need to handle copy paste in one NSViewController
down my responder chain. I have found references to -copy:sender
& -paste:sender
IBAction methods in Obj-C but can't find anything in swift 2.3 I could use. Any ideas?
Asked
Active
Viewed 511 times
0

Ondrej Rafaj
- 4,342
- 8
- 42
- 65
-
Is [this answer](http://stackoverflow.com/questions/25368352/cocoa-forward-actions-copy-paste-etc-up-to-the-responder-chain) useful to your issue? – Ahmad F Nov 15 '16 at 15:00
-
No, I found these, just can't see the selectors in swift – Ondrej Rafaj Nov 15 '16 at 15:07
1 Answers
4
You can stick these in your view controller and unless something else in the responder chain picks them up first your view controller should get the events.
@IBAction func copy(_ sender: Any) {
}
@IBAction func paste(_ sender: Any) {
}

utahwithak
- 6,235
- 2
- 40
- 62