2
0

WFCThemeTableViewCell.m 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // WFCThemeTableViewCell.m
  3. // WildFireChat
  4. //
  5. // Created by dali on 2020/4/11.
  6. // Copyright © 2020 WildFireChat. All rights reserved.
  7. //
  8. #import "WFCThemeTableViewCell.h"
  9. @interface WFCThemeTableViewCell ()
  10. @property(nonatomic, strong)UIImageView *checkImageView;
  11. @end
  12. @implementation WFCThemeTableViewCell
  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. - (UIImageView *)checkImageView {
  22. if (!_checkImageView) {
  23. _checkImageView = [[UIImageView alloc] initWithFrame:CGRectMake([UIScreen mainScreen].bounds.size.width - 44, 18, 20, 20)];
  24. [self.contentView addSubview:_checkImageView];
  25. }
  26. return _checkImageView;
  27. }
  28. - (void)setChecked:(BOOL)checked {
  29. _checked = checked;
  30. if (checked) {
  31. self.checkImageView.image = [UIImage imageNamed:@"single_selected"];
  32. } else {
  33. self.checkImageView.image = [UIImage imageNamed:@"single_unselected"];
  34. }
  35. }
  36. @end