单军华
2018-07-11 7b02207537d35bfa1714bf8beafc921f717d100a
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