RQDspVideoDetailCell.m 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // RQDspVideoDetailCell.m
  3. // SDJK
  4. //
  5. // Created by RONGQING on 2022/1/20.
  6. //
  7. #import "RQDspVideoDetailCell.h"
  8. @interface RQDspVideoDetailCell ()
  9. @property (nonatomic, readwrite, strong) RQDspVideoDetailItemViewModel *viewModel;
  10. @property (weak, nonatomic) IBOutlet UIImageView *coverImageView;
  11. @end
  12. @implementation RQDspVideoDetailCell
  13. #pragma mark - PublicMethods
  14. + (instancetype)cellWithTableView:(UITableView *)tableView {
  15. static NSString *ID = @"RQDspVideoDetailCell";
  16. RQDspVideoDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
  17. if (!cell) {
  18. cell = [self rq_viewFromXib];
  19. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  20. cell.coverImageView.userInteractionEnabled = YES;
  21. cell.coverImageView.tag = 10086;
  22. }
  23. return cell;
  24. }
  25. - (void)bindViewModel:(RQDspVideoDetailItemViewModel *)viewModel {
  26. _viewModel = viewModel;
  27. [_coverImageView yy_setImageWithURL:[NSURL URLWithString:viewModel.videosItem.coverFileUrl] placeholder:RQWebVideoImagePlaceholder() options:RQWebImageOptionAutomatic completion:nil];
  28. }
  29. #pragma mark - SystemMethods
  30. - (void)awakeFromNib {
  31. [super awakeFromNib];
  32. // Initialization code
  33. }
  34. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  35. [super setSelected:selected animated:animated];
  36. // Configure the view for the selected state
  37. }
  38. @end