SearchCell.m 850 B

1234567891011121314151617181920212223242526272829303132333435
  1. //
  2. // SearchCell.m
  3. // smartRhino
  4. //
  5. // Created by niuzhen on 2020/1/2.
  6. // Copyright © 2020 tederen. All rights reserved.
  7. //
  8. #import "SearchCell.h"
  9. @implementation SearchCell
  10. - (instancetype)initWithFrame:(CGRect)frame
  11. {
  12. self = [super initWithFrame:frame];
  13. if (self) {
  14. [self.contentView addSubview:self.titleL];
  15. self.contentView.backgroundColor = [UIColor whiteColor];
  16. [self.titleL mas_makeConstraints:^(MASConstraintMaker *make) {
  17. make.left.mas_offset(15);
  18. make.right.mas_offset(-15);
  19. make.centerY.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:12];
  29. _titleL.textColor = UIColorHex(#999999);
  30. }
  31. return _titleL;
  32. }
  33. @end