dkahgld

ZBGoodDetailHeadView.m 1019B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // ZBGoodDetailHeadView.m
  3. // ZBProject
  4. //
  5. // Created by 学丽 on 2019/3/27.
  6. // Copyright © 2019 ZB. All rights reserved.
  7. //
  8. #import "ZBGoodDetailHeadView.h"
  9. @implementation ZBGoodDetailHeadView
  10. -(instancetype)initWithFrame:(CGRect)frame
  11. {
  12. self =[super initWithFrame:frame];
  13. if (self) {
  14. [self addSubview:self.titleLabel];
  15. self.backgroundColor=[UIColor whiteColor];
  16. [ self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  17. make.left.right.top.mas_equalTo(0);
  18. make.height.mas_equalTo(self.mas_height);
  19. }];
  20. }
  21. return self;
  22. }
  23. -(UILabel *)titleLabel
  24. {
  25. if (!_titleLabel) {
  26. _titleLabel =[[UILabel alloc]init];
  27. _titleLabel.textAlignment=NSTextAlignmentCenter;
  28. _titleLabel.backgroundColor=[UIColor whiteColor];
  29. _titleLabel.font=[UIFont systemFontOfSize:16];
  30. _titleLabel.textColor=[UIColor YHColorWithHex:0x666666];
  31. }
  32. return _titleLabel;
  33. }
  34. @end