0

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?

Ondrej Rafaj
  • 4,342
  • 8
  • 42
  • 65

1 Answers1

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