PhotoCollectionViewCell.m 662 B

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // PhotoCollectionViewCell.m
  3. // LenzCameraNativeModuleForRN
  4. //
  5. // Created by 王昭威 on 2023/1/22.
  6. //
  7. #import "PhotoCollectionViewCell.h"
  8. #import "PhotoListCellModel.h"
  9. @implementation PhotoCollectionViewCell
  10. - (void)setCellModel:(PhotoListCellModel *)cellModel{
  11. self.imageView.image = cellModel.image;
  12. _cellModel = cellModel;
  13. }
  14. - (UIView *)coverView{
  15. return self.imageView;
  16. }
  17. - (void)awakeFromNib {
  18. [super awakeFromNib];
  19. // Initialization code
  20. }
  21. - (void)layoutSubviews{
  22. [super layoutSubviews];
  23. self.imageView.frame = CGRectMake(15, 15, CGRectGetWidth(self.bounds) - 30, CGRectGetHeight(self.bounds) - 30);
  24. }
  25. @end