Sfoglia il codice sorgente

1.相册权限被拒处理

huangxiaodong 1 anno fa
parent
commit
d86f7a9f4f

+ 10 - 1
创维盒子/双子星云手机/Class/Set/uploadFile/uploadImageOrVideoViewController.m

@@ -22,6 +22,8 @@
 @interface uploadImageOrVideoViewController ()<AJPhotoGroupViewProtocol,UICollectionViewDataSource,UICollectionViewDelegate,UICollectionViewDelegateFlowLayout,DZNEmptyDataSetSource, DZNEmptyDataSetDelegate>
 {
     couldPhoneBaseInfoModel *baseInfoModel;
+    
+    BOOL isNotPhotoPermission;//没有权限
 }
 @property (strong, nonatomic) AJPhotoGroupView *photoGroupView;
 @property (strong, nonatomic) UILabel *MytitleLabel;
@@ -491,6 +493,10 @@
 - (NSAttributedString *)titleForEmptyDataSet:(UIScrollView *)scrollView {
     NSString *text = NSLocalizedString(@"common_no_data_tip",nil);
     
+    if(isNotPhotoPermission){
+        text = NSLocalizedString(@"enable_photo_permission_noData_tip",nil);
+    }
+    
     NSDictionary *attributes = @{NSFontAttributeName: [UIFont systemFontOfSize:16.0f],
                                  NSForegroundColorAttributeName: HW999999Color};
     
@@ -803,7 +809,10 @@
 #pragma mark 用户拒接授权相册
 - (void)requestPhotoLibraryAccessWithAlert {
     
-    KWeakSelf
+    isNotPhotoPermission = YES;
+    [self.photoListView reloadData];
+    
+    //KWeakSelf
     /*弹窗提示重启*/
     ComontAlretViewController *nextVC = [[ComontAlretViewController alloc] initWithTiTle:NSLocalizedString(@"enable_photo_permission",nil)
                                                                                      msg:NSLocalizedString(@"enable_photo_permission_tip",nil)

+ 1 - 0
创维盒子/双子星云手机/zh-Hans.lproj/Localizable.strings

@@ -621,3 +621,4 @@
 "disk_space_not_tip_for_95_fail_tip"   = "磁盘空间不足";
 "enable_photo_permission"   = "开启照片权限";
 "enable_photo_permission_tip"   = "照片权限被禁用,允许访问所有照片可以享受更好的上传服务,过程加密安全请放心。";
+"enable_photo_permission_noData_tip"   = "暂未开启相册权限,快去开启吧~";