Няма описание

NSAttributedString+KXExtension.m 609B

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