How to change IOS badge notification colour from default Red to other colours?

谁说胖子不能爱 提交于 2019-12-19 09:26:15

问题


The default APNS allows a number (badge) to appear in Red background on top of our app icon to state that there is a new notification.

Is there a way to change the Red colour background to any other colours based on the backend server output?


回答1:


I don't believe this is possible with public iOS SDK APIs




回答2:


According to Apple iOS Human Interface Guidelines, you cannot change the color or size of the pending notification badge.

A badge is a small red oval that displays the number of pending notification items (a badge appears over the upper-right corner of an app’s icon). You have no control over the size or color of the badge.

If however you are just curious on how to do it, there is a sample project here.




回答3:


Apple not allow to access the UILocalnotification properties so we can not change any thing in uilocal notification , we can only use its default properties



来源:https://stackoverflow.com/questions/11468748/how-to-change-ios-badge-notification-colour-from-default-red-to-other-colours

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!