消息注册时的方法:
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeNewsstandContentAvailability |UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge |
UIRemoteNotificationTypeSound)];
解决方法:去掉 UIRemoteNotificationTypeNewsstandContentAvailability。该通知类型为杂志通知,没有使用过,也不知此通知为何会影响右上角badge的显示。
解除消息注册:
[[UIApplication sharedApplication] unregisterForRemoteNotifications];