TCVideoJoinCell.m 985 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // TCVideoJoinCell.m
  3. // TCLVBIMDemo
  4. //
  5. // Created by annidyfeng on 2017/4/19.
  6. // Copyright © 2017年 tencent. All rights reserved.
  7. //
  8. #import "TCVideoJoinCell.h"
  9. #import "SDKHeader.h"
  10. @implementation TCVideoJoinCellModel
  11. @end
  12. @implementation TCVideoJoinCell
  13. - (void)awakeFromNib {
  14. [super awakeFromNib];
  15. // Initialization code
  16. }
  17. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  18. [super setSelected:selected animated:animated];
  19. // Configure the view for the selected state
  20. }
  21. - (void)setModel:(TCVideoJoinCellModel *)model {
  22. _model = model;
  23. self.name.text = [model.videoPath lastPathComponent];
  24. self.cover.image = model.cover;
  25. self.duration.text = [self time2str:model.duration];
  26. self.resolution.text = [NSString stringWithFormat:@"%d*%d",model.width,model.height];
  27. }
  28. - (NSString *)time2str:(int)time {
  29. int m = time / 60;
  30. int s = time % 60;
  31. return [NSString stringWithFormat:@"%d:%.2d", m, s];
  32. }
  33. @end