DBPrivacyHelper - 實現快速隱私設置簡單UIViewController Category
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

本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!