【问题标题】:Adding a Sidebar Icon to my FinderSync extension向我的 FinderSync 扩展添加侧边栏图标
【发布时间】:2015-11-06 16:18:39
【问题描述】:

我正在根据以下文档开发 FinderSync 扩展:

https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/Finder.html

我未能添加侧边栏图标。

我已按照以下步骤操作:创建了.iconset 文件夹并用请求的PNGs 填充它。将该文件夹添加到我的info.plist 等。

但我在受监控文件夹的边栏中没有看到任何图标。

上下文菜单、工具栏按钮和徽章工作正常。

我会错过什么?文档没有提到任何限制吗?第 4 步有什么棘手的地方吗?

【问题讨论】:

    标签: macos sidebar findersync


    【解决方案1】:

    显然,遵守 Apple 关于图标的限制确实非常重要: 他们必须是

    “仅使用黑色和 透明度”

    令我惊讶的是,当一位设计师给了我符合上述规定的pngs 时,一切都像魅力一样。

    如果您遇到任何其他困难,请发表评论,因为文档非常缺乏。

    【讨论】:

    • 嗨@Mugen 我想达到同样的效果并遵循文档。但是按照文档我得到一个编译时错误。
    • Variant named 'template' contains no image resources. Failed to generate ICSN data for variant named 'template' Command /usr/bin/iconutil emitted errors but did not return a nonzero exit code to indicate failure.
    • 我们使用 Photoshop 创建图像,它们本身不必是图标
    • 对于我在 10.14 和 10.15 中的应用,the custom sidebar icon is appearing even without even providing an .iconset。很烦人,因为我不想侧边栏图标被替换。
    【解决方案2】:

    文档提到了几个例外情况,即您的应用图标不会替换文件夹的图标:

    您提供的侧边栏图标将替换 Finder 侧边栏中的默认文件夹图标,用于您的扩展程序正在监控的任何根文件夹。

    此图标不会替换受监控文件夹中包含的任何文件夹的图标。

    它也不会替换您可能正在监视的任何系统文件夹(例如,文档、桌面、应用程序和下载)的图标。

    https://developer.apple.com/library/archive/documentation/General/Conceptual/ExtensibilityPG/Finder.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2022-11-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多