在App启动时:didFinishLaunchingWithOptions 方法中:application.applicationIconBadgeNumber = ; //角标清零在读消息时: application.applicationIconBadgeNumber--因为未读消息是后台存的,当拉取API后,得到未读消息数:application.applicationIconBadgeNumber = 设置未读消息数