12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- //
- // HomeFlashDealSubCollectCell.m
- // westkissMob
- //
- // Created by iOS on 2022/9/6.
- //
- #import "HomeFlashDealSubCollectCell.h"
- @implementation HomeFlashDealSubCollectCell
- - (void)setModel:(ASProductBaseModel *)model {
- _model = model;
- self.contView.model = model;
- }
- - (void)layoutSubviews {
- [self loadSubV];
- }
- - (void)loadSubV {
- self.backgroundColor = UIColor.whiteColor;
- [self addSubview:self.contView];
- [self.contView mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.left.right.equalTo(self);
- make.width.equalTo(self.contView.mas_height).offset(-productHWithOutImg);
- make.bottom.equalTo(@0);
- }];
- [self addSubview:self.numImgV];
- [self.numImgV mas_makeConstraints:^(MASConstraintMaker *make) {
- make.top.left.equalTo(self.contentView);
- make.width.height.equalTo(@60);
- }];
- }
- - (ASProductItemView *)contView {
- if (!_contView) {
- ASProductItemView *v = [[ASProductItemView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth-20, KScreenWidth-20+productHWithOutImg)];
- _contView = v;
- }
- return _contView;
- }
- - (UIImageView *)numImgV {
- if (!_numImgV) {
- UIImageView *v = [[UIImageView alloc] init];
- v.contentMode = UIViewContentModeScaleAspectFit;
- v.hidden = true;
- _numImgV = v;
- }
- return _numImgV;
- }
- @end
|