SignTableCell.m 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // SignTableCell.m
  3. // jiaPei
  4. //
  5. // Created by apple on 16/4/6.
  6. // Copyright © 2016年 JCZ. All rights reserved.
  7. //
  8. #import "SignTableCell.h"
  9. @implementation SignTableCell
  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. CGFloat x,y,bd,h,w;
  19. x = bd = 10;
  20. y = bd;
  21. w = 80;
  22. h = 100;
  23. _headImg = [[UIImageView alloc] initWithFrame:CGRectMake(x, y + 5, w, h)];
  24. [_headImg borderColor:defGreen width:2 cornorRadios:5];
  25. [self addSubview:_headImg];
  26. x += 90;
  27. w = kSize.width - x;
  28. h = 30.0;
  29. UILabel *label;
  30. label = [[UILabel alloc] initWithFrame:CGRectMake(x, y, w, h)];
  31. [label setTextAlignment:NSTextAlignmentLeft];
  32. label.text = @"签到记录";
  33. label.textColor = titleColor;
  34. [label setFont:[UIFont scaleSize:20]];
  35. [self addSubview:label];
  36. _label1 = label;
  37. y += bd + h;
  38. label = [[UILabel alloc] initWithFrame:CGRectMake(x, y, w, h)];
  39. [label setTextAlignment:NSTextAlignmentLeft];
  40. label.textColor = contentTextColor;
  41. label.text = @"签到时间:暂无";
  42. [label setFont:[UIFont scaleSize:17]];
  43. [self addSubview:label];
  44. _label2 = label;
  45. y += h;
  46. label = [[UILabel alloc] initWithFrame:CGRectMake(x, y, w, 2*h)];
  47. [label setTextAlignment:NSTextAlignmentLeft];
  48. label.textColor = contentTextColor;
  49. label.text = @"签到地点:暂无";
  50. [label setFont:[UIFont scaleSize:17]];
  51. label.numberOfLines = 0;
  52. [self addSubview:label];
  53. _label3 = label;
  54. }
  55. return self;
  56. }
  57. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  58. [super setSelected:selected animated:animated];
  59. // Configure the view for the selected state
  60. }
  61. @end