KWHisKeyWordCell.m 927 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // KWHisKeyWordCell.m
  3. // westkissMob
  4. //
  5. // Created by iOS on 2022/9/14.
  6. //
  7. #import "KWHisKeyWordCell.h"
  8. @implementation KWHisKeyWordCell
  9. - (instancetype)initWithFrame:(CGRect)frame {
  10. self = [super initWithFrame:frame];
  11. if (self) {
  12. [self configSubV];
  13. }
  14. return self;
  15. }
  16. -(void)configSubV {
  17. self.backgroundColor = [UIColor whiteColor];
  18. self.layer.cornerRadius = 2;
  19. [self addSubview:self.titleLb];
  20. [self.titleLb mas_makeConstraints:^(MASConstraintMaker *make) {
  21. make.top.left.equalTo(self).offset(5);
  22. make.center.equalTo(self);
  23. }];
  24. }
  25. - (UILabel *)titleLb {
  26. if (!_titleLb) {
  27. UILabel * lb = [[UILabel alloc] init];
  28. lb.font = [UIFont fontWithName:Rob_Regular size:12];
  29. lb.textAlignment = NSTextAlignmentCenter;
  30. lb.textColor = [UIColor colorWithHexString:@"#1F1D2B"];
  31. _titleLb = lb;
  32. }
  33. return _titleLb;
  34. }
  35. @end