TJCell.m 958 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // TJCell.m
  3. // jiaPeiC
  4. //
  5. // Created by apple on 16/3/22.
  6. // Copyright © 2016年 JCZ. All rights reserved.
  7. //
  8. #import "TJCell.h"
  9. @implementation TJCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. // Initialization code
  13. }
  14. -(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  15. {
  16. self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
  17. if (self) {
  18. float x = 120;
  19. if (kSize.width > 350.0) {
  20. x = 150;
  21. }
  22. _dateLabel = [[UILabel alloc] initWithFrame:CGRectMake(x, 0, kSize.width - x, self.height)];
  23. [self.contentView addSubview:_dateLabel];
  24. }
  25. [self setSelectionStyle:UITableViewCellSelectionStyleNone];
  26. return self;
  27. }
  28. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  29. [super setSelected:selected animated:animated];
  30. // Configure the view for the selected state
  31. }
  32. @end