Skip to content

yuyangdexue/AttributedStringTool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

AttributedStringTool

为了省去繁琐的原生富文本api调用,实现简单的封装。

 NSMutableArray * array  = [[NSMutableArray alloc] init];
    
 [array addObject:[KBAttributedStringModel initWithText:@"我是红色字体" font:[UIFont systemFontOfSize:15] color: [UIColor redColor]]];
 [array addObject:[KBAttributedStringModel initWithText:@" 我是绿色字体 " font:[UIFont systemFontOfSize:13] color: [UIColor greenColor]]];
 [array addObject:[KBAttributedStringModel initWithText:@" 我是蓝色字体" font:[UIFont systemFontOfSize:16] color: [UIColor blueColor]]];
    
 self.lableTest.attributedText = [KBAttributedStringTool conversionAttributedStringFromModelArray:array];

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published