| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- //
- // imageCollectionViewCell.m
- // 双子星云手机
- //
- // Created by xd h on 2024/5/13.
- //
- #import "imageCollectionViewCell.h"
- @interface imageCollectionViewCell()
- @property (strong, nonatomic) UIImageView *imageView;
- @property (nonatomic, strong) UIButton *selectButton;
- @end
- @implementation imageCollectionViewCell
- - (instancetype)initWithFrame:(CGRect)frame {
- if (self = [super initWithFrame:frame]) {
-
- [self setupSubViews];
- }
- return self;
- }
- - (void)setupSubViews{
- _imageView = [UIImageView new];
- [self addSubview:_imageView];
-
- [_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.left.mas_equalTo(0);
- make.right.mas_equalTo(0);
- make.top.mas_equalTo(0);
- make.bottom.mas_equalTo(0);
- }];
- }
- - (void)setCurFileModel:(couldPhoneFileModel *)curFileModel
- {
- _curFileModel = curFileModel;
-
-
- //[[downloadThumbnailManager shareInstance] handlToDownloadThumbnailInDownTableViewWith:@[_curFileModel]];
-
- _imageView.image = [UIImage imageNamed:@"uploadFile_image"];
- if([curFileModel.fileType isEqualToString:@"video"])
- {
- _imageView.image = [UIImage imageNamed:@"uploadFile_Video"];
- }
-
- //checkButton.selected = curFileModel.isSelectType;
- NSString *fileName = [_curFileModel getFileNameFun];
- NSString*pathStr = [cachesFileManager getFilePathWithName:fileName type:DownLoadThumbnail];
- UIImage *curImage = [UIImage imageWithContentsOfFile:pathStr];
- if(curImage){
- _imageView.image = curImage;
- }
-
- }
- @end
|