SearchTabCell.m 885 B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // SearchTabCell.m
  3. // smartRhino
  4. //
  5. // Created by niuzhen on 2020/4/8.
  6. // Copyright © 2020 tederen. All rights reserved.
  7. //
  8. #import "SearchTabCell.h"
  9. @implementation SearchTabCell
  10. - (instancetype)initWithFrame:(CGRect)frame
  11. {
  12. self = [super initWithFrame:frame];
  13. if (self) {
  14. [self.contentView addSubview:self.titleL];
  15. self.contentView.backgroundColor = UIColorHex(0xF5F5F5);
  16. self.contentView.layer.cornerRadius = 4.f;
  17. self.contentView.layer.masksToBounds = YES;
  18. [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {
  19. make.center.mas_equalTo(self.contentView);
  20. }];
  21. }
  22. return self;
  23. }
  24. - (UILabel *)titleL
  25. {
  26. if (!_titleL) {
  27. _titleL = [UILabel new];
  28. _titleL.font = [UIFont systemFontOfSize:13];
  29. _titleL.textColor = UIColorHex(0x858585);
  30. }
  31. return _titleL;
  32. }
  33. @end