// // NSAttributedString+KXExtension.m // CAISHEN // // Created by jikaipeng on 2018/8/1. // Copyright © 2018年 kuxuan. All rights reserved. // #import "NSAttributedString+KXExtension.h" @implementation NSAttributedString (KXExtension) + (NSAttributedString *)setAttibuteWithString:(NSString *)string font:(UIFont *)font forgroundColor:(UIColor *)color{ NSDictionary *attibuteDict = @{NSFontAttributeName:font,NSForegroundColorAttributeName:color}; NSAttributedString *attibuteStr = [[NSAttributedString alloc] initWithString:string attributes:attibuteDict]; return attibuteStr; } @end