YOUPAIHRSearchBannerCell.m 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. //
  2. // YOUPAIHRSearchBannerCell.m
  3. // YOUQU
  4. //
  5. // Created by xiaohaoran on 2021/12/15.
  6. // Copyright © 2021 MS. All rights reserved.
  7. //
  8. #import "YOUPAIHRSearchBannerCell.h"
  9. @implementation YOUPAIHRSearchBannerCell
  10. -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
  11. if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
  12. [self setupUI];
  13. }
  14. return self;
  15. }
  16. -(void)setupUI{
  17. UIImageView *vq_imageView = [UIImageView new];
  18. self.vq_banneriImageView = vq_imageView;
  19. [self addSubview:vq_imageView];
  20. [vq_imageView mas_makeConstraints:^(MASConstraintMaker *make) {
  21. make.left.mas_equalTo(14);
  22. make.top.mas_equalTo(8);
  23. make.bottom.mas_equalTo(-20);
  24. make.right.mas_equalTo(-14);
  25. }];
  26. vq_imageView.layer.cornerRadius = 5;
  27. vq_imageView.contentMode = UIViewContentModeScaleAspectFill;
  28. vq_imageView.clipsToBounds = YES;
  29. }
  30. -(void)setModel:(youpaipbannerModel *)model{
  31. _model = model;
  32. [self.vq_banneriImageView sd_setImageWithURL:[LCTools getImageUrlWithAddress:model.youpaipimage] placeholderImage:nil];
  33. }
  34. @end