WFCFavoriteUnknownCell.m 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // WFCFavoriteUnknownCell.m
  3. // WildFireChat
  4. //
  5. // Created by Tom Lee on 2020/11/1.
  6. // Copyright © 2020 WildFireChat. All rights reserved.
  7. //
  8. #import "WFCFavoriteUnknownCell.h"
  9. @interface WFCFavoriteUnknownCell ()
  10. @property(nonatomic, strong)UILabel *unknownLabel;
  11. @end
  12. @implementation WFCFavoriteUnknownCell
  13. - (void)awakeFromNib {
  14. [super awakeFromNib];
  15. // Initialization code
  16. }
  17. - (void)setFavoriteItem:(WFCUFavoriteItem *)favoriteItem {
  18. [super setFavoriteItem:favoriteItem];
  19. [self unknownLabel];
  20. }
  21. + (CGFloat)contentHeight:(WFCUFavoriteItem *)favoriteItem {
  22. return 30;
  23. }
  24. - (UILabel *)unknownLabel {
  25. if (!_unknownLabel) {
  26. _unknownLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, self.bounds.size.width, 30)];
  27. _unknownLabel.font = [UIFont systemFontOfSize:18];
  28. _unknownLabel.numberOfLines = 1;
  29. _unknownLabel.text = @"当前版本不支持,请升级察看";
  30. [self.contentArea addSubview:_unknownLabel];
  31. }
  32. return _unknownLabel;;
  33. }
  34. @end