ios - iOS 中本地通知自定义图像图标的大小是多少

标签 ios objective-c iphone apple-push-notifications

通常,应用程序图标显示为推送通知图像图标(左侧)。但是,如果我想在推送通知中添加自定义图像,我必须遵循图像的固定大小吗? 感谢您的光临。

最佳答案

它的大小与您通常为应用提供的启动图像相同。

  • 3.5": 640*960
  • 4": 640*1136

等..

这是 Apple 提供的一些描述:

The string is a filename of an image file in the app bundle. This image is a launching image specified for a given notification; when the user taps the action button (for example, “View”) or moves the action slider, the image is used in place of the default launching image. If the value of this property is nil (the default), the system either uses the previous snapshot, uses the image identified by the UILaunchImageFile key in the app’s Info.plist file, or falls back to Default.png.

https://developer.apple.com/library/ios/documentation/iPhone/Reference/UILocalNotification_Class/index.html#//apple_ref/occ/instp/UILocalNotification/alertLaunchImage

关于ios - iOS 中本地通知自定义图像图标的大小是多少,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27961512/

相关文章:

ios - 与 jenkins 一起使用的 xcodebuild 测试命令不起作用

ios - 如何从 UIImagePickerController 拍摄的照片和视频中获取日期?

iphone - 在 iPhone App Store 上启动应用程序的最佳实践

ios - 如何使用从 AVCaptureDevice 捕获的 NSData 和 NSDictionary 组合一个面向 "right"的 UIImage?

IOS Searchbar 返回错误数据

ios - 设置 UIPanGesture 识别期间要查看的框架

ios - TableView 单元格 - UITableView - 无法在详细 View 中显示多行

php - 这可能是移动设备的有效用户代理吗?

ios - 当 tableview 内容大小增加时,scrollview 中的 tableview 然后 tableview 正下方的 textview 上升到 tableview

ios - 支持多种环境的 firebase 崩溃报告