【发布时间】:2015-04-13 13:24:41
【问题描述】:
您好,我使用的是enabledRemoteNotificationTypes,因为我只针对 iOS 7。
但我观察到,如果我将通知设置为none 并删除应用程序然后重新安装,我发现即使在通知设置中我的选项也被选中,enabledRemoteNotificationTypes 方法返回值3,这有点奇怪。
这是我尝试过的:
UIRemoteNotificationType notificationType = [[UIApplication sharedApplication] enabledRemoteNotificationTypes];
// will return YES if "Alert Style" is set to "Banners" or "Alerts"
if (notificationType & UIRemoteNotificationTypeAlert) {
returnVal = YES;
} else {
returnVal = NO;
}
【问题讨论】:
标签: ios objective-c ios7 nsnotificationcenter