NSAttributedString设置行间距,间接设置了uilabel的行间距

 假设有UIlabel实例:_testLabel

 NSString * testString = @"明月当空,隐隐约约听到低吟,似有若无。面对大千世界的奢华糜烂,还不如在这一方小城,静静品一杯茗香。只是,经历了人间的风风雨雨,她早已不是当初那朵出淤泥而不染的莲花。明月当空,隐隐约约听到低吟,似有若无。面对大千世界的奢华糜烂,还不如在这一方小城,静静品一杯茗香。只是,经历了人间的风风雨雨,她早已不是当初那朵出淤泥而不染的莲花。明月当空,隐隐约约听到低吟,似有若无。面对大千世界的奢华糜烂,还不如在这一方小城,静静品一杯茗香。只是,经历了人间的风风雨雨,她早已不是当初那朵出淤泥而不染的莲花。";
    
    NSMutableAttributedString * attributedString = [[NSMutableAttributedString alloc] initWithString:testString];
    NSMutableParagraphStyle * paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    [paragraphStyle setLineSpacing:15];
    
    [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [testString length])];
    
    [_testLabel setAttributedText:attributedString];