ASHomeNewInSubCollectCell.m 1013 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // ASHomeNewInSubCollectCell.m
  3. // Asteria
  4. //
  5. // Created by iOS on 2023/6/9.
  6. //
  7. #import "ASHomeNewInSubCollectCell.h"
  8. @implementation ASHomeNewInSubCollectCell
  9. - (void)setModel:(ASProductBaseModel *)model {
  10. _model = model;
  11. self.contView.model = model;
  12. }
  13. - (void)layoutSubviews {
  14. [self loadSubV];
  15. }
  16. - (void)loadSubV {
  17. self.backgroundColor = UIColor.clearColor;
  18. self.contentView.backgroundColor = UIColor.clearColor;
  19. [self addSubview:self.contView];
  20. [self.contView mas_makeConstraints:^(MASConstraintMaker *make) {
  21. make.top.left.right.equalTo(self);
  22. make.width.equalTo(self.contView.mas_height).offset(-productHWithOutImg-10);
  23. make.bottom.equalTo(@0);
  24. }];
  25. }
  26. - (ASProductItemView *)contView {
  27. if (!_contView) {
  28. ASHomeNewInProductItemView *v = [[ASHomeNewInProductItemView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth-20, KScreenWidth-20+productHWithOutImg + 10)];
  29. _contView = v;
  30. }
  31. return _contView;
  32. }
  33. @end