YOUPAIRightCollectionContentCell.m 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // YOUPAIRightCollectionContentCell.m
  3. // MSYOUPAI
  4. //
  5. // Created by xiaohaoran on 2022/3/1.
  6. // Copyright © 2022 MS. All rights reserved.
  7. //
  8. #import "YOUPAIRightCollectionContentCell.h"
  9. @implementation YOUPAIRightCollectionContentCell
  10. -(instancetype)initWithFrame:(CGRect)frame{
  11. self = [super initWithFrame:frame];
  12. if (self) {
  13. [self youpaifsetSubView];
  14. }
  15. return self;
  16. }
  17. -(void)youpaifsetSubView{
  18. self.youpaipiconImageView = [UIImageView new];
  19. [self.contentView addSubview:self.youpaipiconImageView];
  20. [self.youpaipiconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
  21. make.edges.mas_equalTo(0);
  22. }];
  23. // self.youpaipiconImageView.image = [UIImage imageNamed:@"vqu_images_D_dynamic_play1"];
  24. self.youpaipiconImageView.contentMode = UIViewContentModeScaleAspectFill;
  25. self.youpaipiconImageView.clipsToBounds = YES;
  26. self.youpaipiconImageView.layer.cornerRadius = 10;
  27. self.youpaipiconImageView.backgroundColor = [UIColor whiteColor];
  28. self.youpaipplayImageView = [UIImageView new];
  29. [self.youpaipiconImageView addSubview:self.youpaipplayImageView];
  30. [self.youpaipplayImageView mas_makeConstraints:^(MASConstraintMaker *make) {
  31. make.center.mas_equalTo(0);
  32. make.size.mas_equalTo(CGSizeMake(19, 19));
  33. }];
  34. self.youpaipplayImageView.contentMode = UIViewContentModeScaleAspectFill;
  35. self.youpaipplayImageView.clipsToBounds = YES;
  36. self.youpaipplayImageView.image = [UIImage imageNamed:@"vqu_images_D_dynamic_play1"];
  37. }
  38. -(void)setCycleShow:(BOOL)cycleShow{
  39. _cycleShow = cycleShow;
  40. if (cycleShow) {
  41. self.youpaipiconImageView.layer.borderWidth = 1;
  42. self.youpaipiconImageView.layer.borderColor = [UIColor whiteColor].CGColor;
  43. }else{
  44. self.youpaipiconImageView.layer.borderWidth = 0;
  45. }
  46. }
  47. @end