ios应用通知开启关闭监听
if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0) {
NSString *title = [[UIApplication sharedApplication] currentUserNotificationSettings].types > 0? @"已开启":@"已关闭";
}else{
UIRemoteNotificationType type = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
NSString *title = UIRemoteNotificationTypeNone != type? @"已开启":@"已关闭";
}
[[UIApplication sharedApplication] unregisterForRemoteNotifications]; 关闭远程推送
[[UIApplication sharedApplication] registerForRemoteNotifications]; 开启推送