Geen omschrijving

FKVipPrivilegeDetailCollectionCell.m 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. //
  2. // FKVipPrivilegeDetailCollectionCell.m
  3. // FirstLink
  4. //
  5. // Created by ascii on 2017/5/19.
  6. // Copyright © 2017年 FirstLink. All rights reserved.
  7. //
  8. #import "FKVipPrivilegeDetailCollectionCell.h"
  9. @implementation FKVipPrivilegeDetailCollectionCell
  10. - (instancetype)initWithFrame:(CGRect)frame {
  11. self = [super initWithFrame:frame];
  12. if (self) {
  13. [self setupViews];
  14. }
  15. return self;
  16. }
  17. #pragma mark - Method
  18. - (void)setupViews {
  19. [self addSubview:self.titleLabel];
  20. [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
  21. make.edges.equalTo(self);
  22. }];
  23. [self addSubview:self.rightLine];
  24. [self.rightLine mas_makeConstraints:^(MASConstraintMaker *make) {
  25. make.top.right.bottom.equalTo(self);
  26. make.width.mas_equalTo(1.0/[UIScreen mainScreen].scale);
  27. }];
  28. [self addSubview:self.bottomLine];
  29. [self.bottomLine mas_makeConstraints:^(MASConstraintMaker *make) {
  30. make.left.right.bottom.equalTo(self);
  31. make.height.mas_equalTo(1.0/[UIScreen mainScreen].scale);
  32. }];
  33. }
  34. #pragma mark - Property
  35. - (UILabel *)titleLabel {
  36. if (!_titleLabel) {
  37. _titleLabel = [UILabel new];
  38. _titleLabel.font = [UIFont systemFontOfSize:12];
  39. _titleLabel.textColor = UIColorFromRGB(0x292929);
  40. }
  41. return _titleLabel;
  42. }
  43. - (UIView *)rightLine {
  44. if (!_rightLine) {
  45. _rightLine = [UIView new];
  46. _rightLine.backgroundColor = UIColorFromRGB(0xe5e5e5);
  47. }
  48. return _rightLine;
  49. }
  50. - (UIView *)bottomLine {
  51. if (!_bottomLine) {
  52. _bottomLine = [UIView new];
  53. _bottomLine.backgroundColor = UIColorFromRGB(0xe5e5e5);
  54. }
  55. return _bottomLine;
  56. }
  57. @end