change Badge and push notification in iPhone SDK

风格不统一 提交于 2019-12-05 15:20:57

This will reset the application badge number. If you set that value to zero, it will hide the badge.

[UIApplication sharedApplication].applicationIconBadgeNumber = iCount;

To handle your push notification with a separate view, you need to handle the following message in your application delegate:

- (void)application:(UIApplication *)app didReceiveRemoteNotification:(NSDictionary *)userInfo

You can access the userInfo dictionary to get additional information about the push notification that resulted in the message callback.

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