DBPrivacyHelper - 实现快速隐私设置简单UIViewController Category

jopen 10年前

DBPrivacyHelper一个快速说明工具,能够直接进入系统的隐私设置,开启定位,照片等等等的访问权限。

集成

DBPrivacyHelper is a simple UIViewController category and it has a simple integration:

  • Import UIViewController+DBPrivacyHelper.h
  • Open the modal using a simple method:
- (void) openHelper {      [self showPrivacyHelperForType:DBPrivacyTypeLocation];  }
  • Use the other method to customize the controller or the action blocks:
- (void) openHelperToCustomize {      [self showPrivacyHelperForType:DBPrivacyTypeLocation controller:^(DBPrivateHelperController *vc) {          //customize the view controller to present      } didPresent:^{          //customize the completion block of presentViewController:animated:completion:      } didDismiss:^{          //customize the completion block of dismissViewControllerAnimated:completion:      } useDefaultSettingPane:YES];  }

If useDefaultSettingPane: is set to YES, DBPrivacyHelper opens the default setting pane in iOS 8. Set NO if you want to see the DBPrivateHelperController with all iOS.

Privacy settings types:

  • DBPrivacyTypePhoto
  • DBPrivacyTypeCamera
  • DBPrivacyTypeLocation
  • DBPrivacyTypeHealth
  • DBPrivacyTypeHomeKit
  • DBPrivacyTypeMotionActivity

DBPrivacyHelper - 实现快速隐私设置人简单UIViewController category

项目主页:http://www.open-open.com/lib/view/home/1418786048245