HomeWeiCousreCollectCell.m 951 B

123456789101112131415161718192021222324252627
  1. //
  2. // HomeWeiCousreCollectCell.m
  3. // smartRhino
  4. //
  5. // Created by niuzhen on 2020/5/18.
  6. // Copyright © 2020 tederen. All rights reserved.
  7. //
  8. #import "HomeWeiCousreCollectCell.h"
  9. @implementation HomeWeiCousreCollectCell
  10. - (void)awakeFromNib {
  11. [super awakeFromNib];
  12. // Initialization code
  13. }
  14. - (void)setDataWithTitle:(NSString *)title isSelect:(BOOL)select
  15. {
  16. NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:title];
  17. NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
  18. [paragraphStyle setLineSpacing:12];
  19. [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [title length])];
  20. [attributedString addAttribute:NSForegroundColorAttributeName value:select ? UIColorHex(0xFF6429) : UIColorHex(0x222222) range:NSMakeRange(0, [title length])];
  21. self.titleL.attributedText = attributedString;
  22. }
  23. @end