【问题标题】:Mac - Displaying a modal window on tap of Print button in Print Dialog ExtensionMac - 在打印对话框扩展中点击打印按钮显示模式窗口
【发布时间】:2013-03-27 08:10:44
【问题描述】:

当用户点击打印按钮时是否可以执行自定义操作?例如,我可以在打印前显示一个身份验证对话框吗?

我是 Mac 打印机开发的新手。任何帮助将不胜感激。 谢谢!

【问题讨论】:

    标签: macos driver printers printdialog


    【解决方案1】:

    在PDE中,我通过以下方法截取了打印动作:

    - (void)shouldPrint

    在该方法中返回 YES 或 NO 之前,我以模态方式显示了 NSWindow。
    (当 NSWindow 模态显示时,“shouldPrint”方法的执行将停止。)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-04-05
      • 2018-11-11
      • 1970-01-01
      • 1970-01-01
      • 2015-01-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多