Przeglądaj źródła

1.修改Camera权限检测。

Pen Li 9 lat temu
rodzic
commit
9feca877e8

BIN
RA Image/RA Image.xcodeproj/project.xcworkspace/xcuserdata/macmini1.xcuserdatad/UserInterfaceState.xcuserstate


+ 7 - 2
RA Image/RA Image/BasicModeViewController.m

@@ -96,7 +96,10 @@
         if ([[UIApplication sharedApplication]canOpenURL:url]) {
             [[UIApplication sharedApplication]openURL:url];// 打开权限后返回应用会重启
         } else {
-            [RAUtils message_alert:@"RA Image need Authorization to use Camera" title:@"Warning" controller:self];
+            NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
+            NSString *appName = [infoDict objectForKey:@"CFBundleName"];
+            
+            [RAUtils message_alert:[NSString stringWithFormat:@"%@ need Authorization to use Camera",appName] title:@"Warning" controller:self];
         }
         return;
     }
@@ -123,7 +126,9 @@
         if ([[UIApplication sharedApplication] canOpenURL:url]) {
             [[UIApplication sharedApplication] openURL:url];
         } else {
-            [RAUtils message_alert:@"RA Image need Authorization to use photo library" title:@"Warning" controller:self];
+            NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
+            NSString *appName = [infoDict objectForKey:@"CFBundleName"];
+            [RAUtils message_alert:[NSString stringWithFormat:@"%@ need Authorization to use photo library",appName] title:@"Warning" controller:self];
         }
         return;
     }