No Description

FKProHeaderView.m 981B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // FKProHeaderView.m
  3. // FirstLink
  4. //
  5. // Created by jack on 16/8/16.
  6. // Copyright © 2016年 FirstLink. All rights reserved.
  7. //
  8. #import "FKProHeaderView.h"
  9. @implementation FKProHeaderView
  10. - (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier{
  11. if (self = [super initWithReuseIdentifier:reuseIdentifier]) {
  12. [self addAllSubviews];
  13. }
  14. return self;
  15. }
  16. - (void)addAllSubviews{
  17. self.contentView.backgroundColor = [UIColor whiteColor];
  18. [self.contentView addSubview:self.titleLabel];
  19. [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  20. make.left.equalTo(self.contentView).offset(15);
  21. make.centerY.equalTo(self.contentView);
  22. }];
  23. }
  24. - (UILabel *)titleLabel{
  25. if (_titleLabel == nil) {
  26. _titleLabel = [[UILabel alloc]init];
  27. _titleLabel.font = [UIFont systemFontOfSize:13];
  28. _titleLabel.textColor = UIColorFromRGB(0x333333);
  29. }
  30. return _titleLabel;
  31. }
  32. @end