DetailMarkCell.m 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // DetailMarkCell.m
  3. // jiaPei
  4. //
  5. // Created by apple on 16/1/13.
  6. // Copyright © 2016年 JCZ. All rights reserved.
  7. //
  8. #import "DetailMarkCell.h"
  9. @implementation DetailMarkCell
  10. -(instancetype)initWithFrame:(CGRect)frame
  11. {
  12. self = [super initWithFrame:frame];
  13. if (self)
  14. {
  15. self.backgroundColor = backGroundColor;
  16. CGFloat width = self.frame.size.width;
  17. CGFloat hight = self.frame.size.height/2.0;
  18. _imgView = [[UIImageView alloc] initWithFrame:CGRectMake((width - hight + 30)/2, 30, hight - 30, hight - 30)];
  19. [self addSubview:_imgView];
  20. _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, hight + 20, width, 30)];
  21. [_titleLabel setTextAlignment:NSTextAlignmentCenter];
  22. [_titleLabel setFont: [UIFont scaleSize:20]];
  23. [_titleLabel setNumberOfLines:0];
  24. [self addSubview:_titleLabel];
  25. _detailLabel = [[UILabel alloc] initWithFrame:CGRectMake(10, hight + 50, width - 20, hight - 50)];
  26. [_detailLabel setFont:[UIFont scaleSize:14]];
  27. [_detailLabel setNumberOfLines:0];
  28. [self addSubview:_detailLabel];
  29. }
  30. return self;
  31. }
  32. @end