35.iOS7与iOS8 适配是否开启推送功能 返回Bool值

来源:互联网 发布:北京赛车软件开发 编辑:程序博客网 时间:2024/06/05 06:24

-(BOOL)isPushCurrentOpen{

    if (iOS8){

        

        UIUserNotificationType types = [[UIApplication sharedApplication]currentUserNotificationSettings].types;

        return (types);

    }else{

        UIRemoteNotificationType types = [[UIApplication sharedApplication]enabledRemoteNotificationTypes];

        

        return (types);

    }

}

0 0