fix
This commit is contained in:
@@ -407,21 +407,12 @@
|
||||
if(authStatus == AVAuthorizationStatusRestricted || authStatus == AVAuthorizationStatusDenied){
|
||||
NSString *errorStr = @"应用相机权限受限,请在设置中启用";
|
||||
[self jxt_showAlertWithTitle:@"" message:errorStr appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
alertMaker.addActionCancelTitle(@"取消");
|
||||
alertMaker.addActionDefaultTitle(@"去开启");
|
||||
alertMaker.addActionCancelTitle(@"知道了");
|
||||
|
||||
|
||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||
|
||||
if (buttonIndex == 1) {
|
||||
|
||||
NSString *urlStr = @"App-Prefs:root=Photos";
|
||||
if (@available(iOS 10.0, *)) {
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr] options:@{} completionHandler:nil];
|
||||
} else {
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr]];
|
||||
// Fallback on earlier versions
|
||||
}
|
||||
}
|
||||
|
||||
}];
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -411,21 +411,12 @@
|
||||
if(authStatus == AVAuthorizationStatusRestricted || authStatus == AVAuthorizationStatusDenied){
|
||||
NSString *errorStr = @"应用相机权限受限,请在设置中启用";
|
||||
[self jxt_showAlertWithTitle:@"" message:errorStr appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
alertMaker.addActionCancelTitle(@"取消");
|
||||
alertMaker.addActionDefaultTitle(@"去开启");
|
||||
alertMaker.addActionCancelTitle(@"知道了");
|
||||
//alertMaker.addActionDefaultTitle(@"去开启");
|
||||
|
||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||
|
||||
if (buttonIndex == 1) {
|
||||
|
||||
NSString *urlStr = @"App-Prefs:root=Photos";
|
||||
if (@available(iOS 10.0, *)) {
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr] options:@{} completionHandler:nil];
|
||||
} else {
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlStr]];
|
||||
// Fallback on earlier versions
|
||||
}
|
||||
}
|
||||
|
||||
}];
|
||||
return;
|
||||
}
|
||||
@@ -450,19 +441,13 @@
|
||||
|
||||
}else{
|
||||
|
||||
NSString *errorStr = @"应用相权册限受限,请在设置中启用";
|
||||
NSString *errorStr = @"应用相册权限受限,请在设置中启用";
|
||||
[self jxt_showAlertWithTitle:@"" message:errorStr appearanceProcess:^(JXTAlertController * _Nonnull alertMaker) {
|
||||
alertMaker.addActionCancelTitle(@"取消");
|
||||
alertMaker.addActionDefaultTitle(@"去开启");
|
||||
alertMaker.addActionCancelTitle(@"知道了");
|
||||
//alertMaker.addActionDefaultTitle(@"去开启");
|
||||
|
||||
} actionsBlock:^(NSInteger buttonIndex, UIAlertAction * _Nonnull action, JXTAlertController * _Nonnull alertSelf) {
|
||||
if (buttonIndex == 1) {
|
||||
NSURL *url = [NSURL URLWithString:@"prefs:root=Photos"];
|
||||
if ([[UIApplication sharedApplication] canOpenURL:url]) {
|
||||
[[UIApplication sharedApplication] openURL:url];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user