Forráskód Böngészése

1.选择图片上传去到最大数限制

huangxiaodong 1 éve%!(EXTRA string=óta)
szülő
commit
bf3dab1317

+ 1 - 1
创维盒子/双子星云手机/Class/Set/uploadFile/PhotoPreviewViewController.h

@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
 //选中的项 TZAssetModel
 @property (nonatomic, strong) NSMutableArray *indexPathsForSelectedItems;
 //最多选择项
-@property (nonatomic, assign) NSInteger maximumNumberOfSelection;
+//@property (nonatomic, assign) NSInteger maximumNumberOfSelection;
 //最少选择项
 @property (nonatomic, assign) NSInteger minimumNumberOfSelection;
 

+ 3 - 3
创维盒子/双子星云手机/Class/Set/uploadFile/PhotoPreviewViewController.m

@@ -92,9 +92,9 @@
     TZAssetModel *model = self.assets[_currentIndex];
     
     //超出最大限制
-    if (self.indexPathsForSelectedItems.count >= self.maximumNumberOfSelection ) {
-        return;
-    }
+//    if (self.indexPathsForSelectedItems.count >= self.maximumNumberOfSelection ) {
+//        return;
+//    }
     
     //取消选中
     if ([self.indexPathsForSelectedItems containsObject:model]) {

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

@@ -89,7 +89,7 @@
 #pragma mark 选中按钮
 - (void)didClickButFun:(UIButton*)but
 {
-    //but.selected = !but.selected;
+    but.selected = !but.selected;
     if(_didClckSelectBut){
         _didClckSelectBut(but.selected);
     }

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

@@ -33,7 +33,7 @@
 @property (strong, nonatomic) uploadFileBottomView *uploadFileBottomV;
 
 //最多选择项
-@property (nonatomic, assign) NSInteger maximumNumberOfSelection;
+//@property (nonatomic, assign) NSInteger maximumNumberOfSelection;
 
 //最少选择项
 @property (nonatomic, assign) NSInteger minimumNumberOfSelection;
@@ -60,7 +60,7 @@
     [self initBaselUIFun];
     
     _isNotAllowed = YES;
-    _maximumNumberOfSelection = 30;
+    //_maximumNumberOfSelection = 3;
     _minimumNumberOfSelection = 0;
     _multipleSelection = YES;
     
@@ -453,7 +453,7 @@
     vc.assets = _assets;
     vc.currentIndex = indexPath.row;
     vc.indexPathsForSelectedItems = _indexPathsForSelectedItems;
-    vc.maximumNumberOfSelection = _maximumNumberOfSelection;
+    //vc.maximumNumberOfSelection = _maximumNumberOfSelection;
     vc.minimumNumberOfSelection = _minimumNumberOfSelection;
     vc.availableStorage = self.uploadFileBottomV.availableStorage;
     [self.navigationController pushViewController:vc animated:YES];
@@ -486,9 +486,9 @@
     TZAssetModel *model = self.assets[indexPath.row];
     
     //超出最大限制
-    if (self.indexPathsForSelectedItems.count >= self.maximumNumberOfSelection ) {
-        return;
-    }
+//    if (self.indexPathsForSelectedItems.count >= self.maximumNumberOfSelection ) {
+//        return;
+//    }
     
     //取消选中
     if ([self.indexPathsForSelectedItems containsObject:model]) {