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
Ondrej Rafaj
4,4478 gold badges46 silver badges66 bronze badges
-
Is this answer useful to your issue?Ahmad F– Ahmad F2016年11月15日 15:00:02 +00:00Commented Nov 15, 2016 at 15:00
-
No, I found these, just can't see the selectors in swiftOndrej Rafaj– Ondrej Rafaj2016年11月15日 15:07:31 +00:00Commented Nov 15, 2016 at 15:07
1 Answer 1
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
utahwithak
6,3653 gold badges45 silver badges64 bronze badges
Sign up to request clarification or add additional context in comments.
Comments
lang-swift