// // HSQAuthorityManager.m // YouHuiProject // // Created by 小花 on 2018/1/25. // Copyright © 2018年 kuxuan. All rights reserved. // #import "HSQAuthorityManager.h" #import @implementation HSQAuthorityManager +(BOOL)isObtainUserNotificationAuthority{ BOOL isOpen = NO; #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_8_0 UIUserNotificationSettings *setting = [[UIApplication sharedApplication] currentUserNotificationSettings]; if (setting.types != UIUserNotificationTypeNone) { isOpen = YES; } #else UIRemoteNotificationType type = [[UIApplication sharedApplication] enabledRemoteNotificationTypes]; if (type != UIRemoteNotificationTypeNone) { isOpen = YES; } #endif return isOpen; } + (BOOL)CanPhotoLibary{ PHAuthorizationStatus authStatus = [PHPhotoLibrary authorizationStatus]; if (authStatus == PHAuthorizationStatusAuthorized) { return NO; }else{ return YES; } } @end