JOTableViewCell.m 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // JOTableViewCell.m
  3. // shiku_im
  4. //
  5. // Created by on 16/9/6.
  6. // Copyright © 2016年 Reese. All rights reserved.
  7. #import "JOTableViewCell.h"
  8. #import "JODYModel.h"
  9. @implementation JOTableViewCell
  10. -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
  11. if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]){
  12. self.image1 = [[UIImageView alloc]initWithFrame:CGRectMake(10, 7.5, 40, 40)];
  13. self.lable1 = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(self.image1.frame)+10,7.5,SCREEN_WIDTH-100-60-88 , 50+cellScale -7.5)];
  14. self.lable1.verticalAlignment = NSTextVerticalAlignmentTop;
  15. self.lable1.numberOfLines = 0;
  16. self.lable1.font = FONT_SIZE(12);
  17. self.button1 = [[ZXsubButton alloc]initWithFrame:CGRectMake(SCREEN_WIDTH -100-88,7.8, 90, 20)];
  18. self.button1.titleLabel.font = FONT_SIZE(12);
  19. self.button1.titleLabel.textAlignment = NSTextAlignmentRight;
  20. self.button1.titleLabel.verticalAlignment = NSTextVerticalAlignmentTop;
  21. [self.contentView addSubview:self.image1];
  22. [self.contentView addSubview:self.lable1];
  23. [self.contentView addSubview:self.button1];
  24. }
  25. return self;
  26. }
  27. - (void)awakeFromNib {
  28. [super awakeFromNib];
  29. // Initialization code
  30. }
  31. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  32. [super setSelected:selected animated:animated];
  33. // self.contentView.backgroundColor = selected ? [UIColor whiteColor] : [UIColor colorWithWhite:0 alpha:0.1];
  34. }
  35. @end