//
//  ICBatteryCareSubTextViewCell.m
//  superCleaner
//
//  Created by Mazy on 2020/7/31.
//  Copyright © 2020 Mazy. All rights reserved.
//

#import "ICBatteryCareSubTextViewCell.h"

@implementation ICBatteryCareSubTextViewCell

-(void)subText: (NSString *)desc {
    //通过富文本来设置行间距
    NSMutableParagraphStyle *paraph = [[NSMutableParagraphStyle alloc] init];
    //将行间距设置为
//    paraph.lineSpacing = 6;
    // 设置文字左右对齐
    paraph.alignment = NSTextAlignmentJustified;
    //样式属性集合
    NSMutableAttributedString *muteStrihg = [[NSMutableAttributedString alloc] initWithString: desc];
    [muteStrihg  addAttribute: NSParagraphStyleAttributeName value:paraph range:NSMakeRange(0, desc.length)];
    [muteStrihg addAttribute:NSFontAttributeName value:[UIFont systemFontOfSize:15] range:NSMakeRange(0, desc.length)];
    [muteStrihg addAttribute:NSForegroundColorAttributeName value: [UIColor colorWithHex:0x22293D] range:NSMakeRange(0, desc.length)];
    self.subTextLabel.attributedText = muteStrihg;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
