【问题标题】:What is the max limit of contentImage of NSUserNotificationNSUserNotification 的 contentImage 的最大限制是多少
【发布时间】:2018-01-26 16:16:41
【问题描述】:

我有一个 mac 应用程序,当从 URL 下载图像时,显示 NSUsernotificationcontentImage,但有时图像尺寸非常大,此时通知未发送,我可以看到下载任务中没有错误信息。

因此,可以在 NSUsernotification 中显示的 contentImage 的大小是否有限制?可能是我超过了,通知没有显示?

【问题讨论】:

    标签: ios xcode macos nsimage nsusernotification


    【解决方案1】:

    NSUserNotification 期望图像具有 44×44 像素的分辨率,如果图像具有其他分辨率,则会缩放图像。 https://blog.timschroeder.net/2014/01/25/os-x-notifications-with-custom-images/

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-08-26
      • 2017-01-28
      • 1970-01-01
      • 2014-12-12
      • 1970-01-01
      • 2014-09-17
      • 2011-04-23
      相关资源
      最近更新 更多