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

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

问题描述

静态通知和动态通知的区别是什么?谁能帮帮我

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

推荐答案

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

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.

长 - 静态您可以在 Storyboard 上自定义这些.您不能直接在情节提要上添加按钮,但如果在通知负载(.apns 文件)上正确定义,您可以拥有它们.您可以添加仅包含在捆绑包中的图片.

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.

长 - 动态静态的一切都可以做,但您在这里有机会使用通知有效负载中未出现的新数据更新 UI 元素,甚至更新 UI 元素,如来自托管应用程序的图形(可能是地图屏幕截图).同样,您不能从 Storyboard 中放置按钮,但如果在 Notification 负载上定义,您可以拥有它们.尽量避免使用这些,如果你可以用静态的做你想做的事,因为手表在某些情况下会默认为静态的(电池电量低......)

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...)

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

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