Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 macOS 中,我需要在NSViewController响应者链中处理复制粘贴。我在 Obj-C 中找到了对-copy:sender& -paste:senderIBAction 方法的引用,但在我可以使用的 swift 2.3 中找不到任何东西。有任何想法吗?
NSViewController
-copy:sender
-paste:sender
您可以将它们粘贴在您的视图控制器中,除非响应者链中的其他东西首先拾取它们,否则您的视图控制器应该获取事件。
@IBAction func copy(_ sender: Any) { } @IBAction func paste(_ sender: Any) { }