Sin descripción

FKPreferResCell.m 967B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // FKCategoryResCell.m
  3. // FirstLink
  4. //
  5. // Created by jack on 16/5/28.
  6. // Copyright © 2016年 FirstLink. All rights reserved.
  7. //
  8. #import "FKPreferResCell.h"
  9. @implementation FKPreferResCell
  10. - (instancetype)initWithFrame:(CGRect)frame{
  11. if (self = [super initWithFrame:frame]) {
  12. [self addAllSubviews];
  13. }
  14. return self;
  15. }
  16. - (void)addAllSubviews{
  17. [self.contentView addSubview:self.titleLabel];
  18. [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  19. make.edges.insets(UIEdgeInsetsZero);
  20. }];
  21. }
  22. - (UILabel *)titleLabel{
  23. if (_titleLabel == nil) {
  24. _titleLabel = [[UILabel alloc]init];
  25. _titleLabel.backgroundColor = UIColorFromRGB(0xe2e2e2);
  26. _titleLabel.font = [UIFont systemFontOfSize:16];
  27. _titleLabel.layer.cornerRadius = 3.0f;
  28. _titleLabel.layer.masksToBounds = YES;
  29. _titleLabel.textAlignment = NSTextAlignmentCenter;
  30. }
  31. return _titleLabel;
  32. }
  33. @end