WFCUSelectedFileCollectionViewCell.m 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. //
  2. // SelectedFileCollectionViewCell.m
  3. // WFChat UIKit
  4. //
  5. // Created by WF Chat on 2017/10/28.
  6. // Copyright © 2017年 WildFireChat. All rights reserved.
  7. //
  8. #import "WFCUSelectedFileCollectionViewCell.h"
  9. @implementation WFCUSelectedFileCollectionViewCell
  10. -(instancetype)initWithCoder:(NSCoder *)aDecoder {
  11. self = [super initWithCoder:aDecoder];
  12. if (self) {
  13. [self setup];
  14. }
  15. return self;
  16. }
  17. -(instancetype)initWithFrame:(CGRect)frame {
  18. self = [super initWithFrame:frame];
  19. if (self) {
  20. [self setup];
  21. }
  22. return self;
  23. }
  24. -(instancetype)init {
  25. self = [super init];
  26. if (self) {
  27. [self setup];
  28. }
  29. return self;
  30. }
  31. - (UIImageView *)backIV {
  32. if (!_backIV) {
  33. _backIV = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 96, 96)];
  34. [self addSubview:_backIV];
  35. [_backIV setImage:[UIImage imageNamed:@"file_icon"]];
  36. }
  37. return _backIV;
  38. }
  39. - (UIImageView *)selectIV {
  40. if (!_selectIV) {
  41. _selectIV = [[UIImageView alloc] initWithFrame:CGRectMake(70, 4, 22, 22)];
  42. [self.backIV addSubview:_selectIV];
  43. }
  44. return _selectIV;
  45. }
  46. - (UILabel *)fileNameLbl {
  47. if (!_fileNameLbl) {
  48. _fileNameLbl = [[UILabel alloc] initWithFrame:CGRectMake(4, 98, 88, 22)];
  49. [_fileNameLbl setTextAlignment:NSTextAlignmentCenter];
  50. [self addSubview:_fileNameLbl];
  51. }
  52. return _fileNameLbl;
  53. }
  54. - (void)setup {
  55. }
  56. @end