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?

asked Nov 15, 2016 at 14:40
2
  • Is this answer useful to your issue? Commented Nov 15, 2016 at 15:00
  • No, I found these, just can't see the selectors in swift Commented Nov 15, 2016 at 15:07

1 Answer 1

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) {
}
answered Oct 21, 2017 at 22:34
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.