SetUpCell.m 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // SetUpCell.m
  3. // jitao
  4. //
  5. // Created by 罗云飞 on 2018/9/5.
  6. // Copyright © 2018年 罗云飞. All rights reserved.
  7. //
  8. #import "SetUpCell.h"
  9. @implementation SetUpCell
  10. - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
  11. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  12. if (self) {
  13. _imageview = [UIImageView new];
  14. [self.contentView addSubview:_imageview];
  15. _imageview.sd_layout
  16. .leftSpaceToView(self.contentView, 15)
  17. .heightIs(20)
  18. .topSpaceToView(self.contentView, 12)
  19. .widthIs(19);
  20. _title = [UILabel new];
  21. _title.textColor = [UIColor colorWithString:@"#3C3C3C"];
  22. _title.font = NewFont(14);
  23. [_title setSingleLineAutoResizeWithMaxWidth:0];
  24. [self.contentView addSubview:_title];
  25. _title.sd_layout
  26. .heightIs(45)
  27. .topEqualToView(self.contentView)
  28. .leftSpaceToView(_imageview, 10);
  29. }
  30. return self;
  31. }
  32. - (void)awakeFromNib {
  33. [super awakeFromNib];
  34. // Initialization code
  35. }
  36. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  37. [super setSelected:selected animated:animated];
  38. // Configure the view for the selected state
  39. }
  40. @end