静态通知和动态通知有什么区别? [英] Wat is the difference between static notification and dynamic notification?

查看:209
本文介绍了静态通知和动态通知有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

静态通知和动态通知之间有什么区别? 谁能帮我

解决方案

通知有两种:长和短(根据iOS 8.2).长的可以是静态的也可以是动态的.它们都有一个系统的关闭"按钮.

您根本无法自定义这些.它们显示您的应用徽标,通知有效负载的标题和您的应用名称.

长-静态 您可以在情节提要中自定义这些内容.您不能直接在情节提要板上添加按钮,但是如果在Notification有效负载(.apns文件)中正确定义了按钮,则可以拥有它们.如果图像仅在捆绑销售中,则可以添加图像.

长-动态 静态对象可以执行的所有操作,但是您可以在其中使用不包含在Notification有效负载中的新数据来更新UI元素,甚至可以更新UI元素(例如来自托管应用的图形)(也许是地图截图).同样,您不能从情节提要中放置按钮,但是如果在Notification有效负载上进行了定义,则可以使用它们.如果您可以使用静态"手表来做您想做的事情,请尽量避免使用这些手表,因为在某些情况下(电池电量低...),手表会默认为静态"手表.

Wat is the difference between static notification and dynamic notification? could anyone help me

解决方案

Notifications come in 2 flavours Short and Long (as per iOS 8.2). The Long ones can be Static or Dynamic. All of them have a system "Dismiss" button.

Short You can't customise these at all. They show your app logo, the title of the notification payload and your app name.

Long - Static You can customise these on the Storyboard. You can't add buttons directly on the Storyboard but you can have them if defined properly on the Notification payload (.apns file). You can add images if they are in the bundle only.

Long - Dynamic Everything Static ones can do but you have here the chance to update the UI elements with new data not coming on the Notification payload or even update the UI elements like graphics from the hosted app (maybe a map screenshot). Again, you can't put buttons from the Storyboard but you can have them if defined on the Notification payload. Try to avoid using these if you can do what you want with Static ones as the Watch will default to Static ones in some cases (low battery...)

这篇关于静态通知和动态通知有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆