LightingCell.m 810 B

12345678910111213141516171819202122232425262728293031323334
  1. //
  2. // LightingCell.m
  3. // jiaPei
  4. //
  5. // Created by apple on 16/1/18.
  6. // Copyright © 2016年 JCZ. All rights reserved.
  7. //
  8. #import "LightingCell.h"
  9. @implementation LightingCell
  10. -(instancetype)initWithFrame:(CGRect)frame
  11. {
  12. self = [super initWithFrame:frame];
  13. if (self)
  14. {
  15. CGFloat width = (kSize.width - 8)/4.0 - 30;
  16. _imgView = [[UIImageView alloc] initWithFrame:CGRectMake(15, 10, width, width)];
  17. [self.contentView addSubview:_imgView];
  18. _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(5, 10 + width, (kSize.width - 8)/4.0 - 10, 20)];
  19. _titleLabel.textAlignment = NSTextAlignmentCenter;
  20. [_titleLabel setFont:[UIFont scaleSize:14]];
  21. [self.contentView addSubview:_titleLabel];
  22. }
  23. return self;
  24. }
  25. @end