NewRegistCell.m 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //
  2. // NewRegistCell.m
  3. // SERVICE
  4. //
  5. // Created by 肖雨 on 2017/8/12.
  6. // Copyright © 2017年 Luo. All rights reserved.
  7. //
  8. #import "NewRegistCell.h"
  9. @implementation NewRegistCell
  10. - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
  11. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  12. if (self) {
  13. _title = [[UILabel alloc] init];
  14. _title.font = NewFont(fitScreenWidth(14));
  15. _title.textColor = NewBlackColor;
  16. [_title setSingleLineAutoResizeWithMaxWidth:0];
  17. [self.contentView addSubview:_title];
  18. _title.sd_layout
  19. .leftSpaceToView(self.contentView, 30)
  20. .bottomEqualToView(self.contentView)
  21. .topSpaceToView(self.contentView, 0)
  22. .heightIs(fitScreenWidth(30));
  23. _areacode = [[UILabel alloc] init];
  24. _areacode.text = @"+86";
  25. _areacode.font = NewFont(fitScreenWidth(13));
  26. _areacode.textColor = NewLightGrayColor;
  27. [self.contentView addSubview:_areacode];
  28. _areacode.sd_layout
  29. .leftSpaceToView(self.contentView, 110)
  30. .centerYEqualToView(self.title)
  31. .heightIs(fitScreenWidth(30));
  32. UILabel *line = [UILabel new];
  33. line.backgroundColor = NewLineGrayColor;
  34. [self.contentView addSubview:line];
  35. line.sd_layout
  36. .leftEqualToView(_title)
  37. .bottomEqualToView(self.contentView)
  38. .rightSpaceToView(self.contentView, 30)
  39. .heightIs(0.6);
  40. }
  41. return self;
  42. }
  43. - (void)awakeFromNib {
  44. [super awakeFromNib];
  45. // Initialization code
  46. }
  47. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  48. [super setSelected:selected animated:animated];
  49. // Configure the view for the selected state
  50. }
  51. @end