单军华
2018-07-19 83b9d5c682b21d88133f24da0f94dd56bd79e687
screendisplay/Pods/RAlertView/RAlertView/TextHelper.m
New file
@@ -0,0 +1,23 @@
//
//  TextHelper.m
//  RAlert
//
//  Created by roycms on 2016/11/26.
//  Copyright © 2016年 roycms. All rights reserved.
//
#import "TextHelper.h"
@implementation TextHelper
+ (NSMutableAttributedString *)attributedStringForString:(NSString *)str lineSpacing:(CGFloat)lineSpacing{
    NSMutableAttributedString * attributedString = [[NSMutableAttributedString alloc] initWithString:str];
    NSMutableParagraphStyle * paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    [paragraphStyle setLineSpacing:lineSpacing];
    [attributedString addAttribute:NSParagraphStyleAttributeName value:paragraphStyle range:NSMakeRange(0, [str length])];
    return attributedString;
}
@end