NewsOfLearnCell.m 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. //
  2. // NewsOfLearnCell.m
  3. // jiaPei
  4. //
  5. // Created by apple on 2018/2/10.
  6. // Copyright © 2018年 JCZ. All rights reserved.
  7. //
  8. #import "NewsOfLearnCell.h"
  9. @implementation NewsOfLearnCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. self.dateLabel.textColor = contentTextColor;
  13. self.watchLabel.textColor = contentTextColor;
  14. [self.titleLabel setFont:[UIFont scaleSize:17]];
  15. [self.dateLabel setFont:[UIFont scaleSize:14]];
  16. [self.watchLabel setFont:[UIFont scaleSize:14]];
  17. }
  18. -(void)drawRect:(CGRect)rect
  19. {
  20. CGFloat y = self.height - 2;
  21. CGFloat w = self.width - 10;
  22. CGContextRef context =UIGraphicsGetCurrentContext();
  23. CGContextSetStrokeColorWithColor(context, contentTextColor.CGColor);
  24. CGFloat length[2] = {5,5};
  25. CGContextSetLineDash(context, 20, length, 2);
  26. CGContextMoveToPoint(context, 10, y);
  27. CGContextAddLineToPoint(context, w, y);
  28. CGContextStrokePath(context);
  29. }
  30. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  31. [super setSelected:selected animated:animated];
  32. // Configure the view for the selected state
  33. }
  34. @end