Skip to content
This repository has been archived by the owner on Nov 18, 2020. It is now read-only.

thilong/FastAttributedString

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

FastAttributedString

Fast create NSAttributedString

#Usage:

_label.attributedText = [NSAttributedString fast:@"This is a [*#730000 14*]TEST[**]. Org style. [*#008899 24*]by -Thilong."];

######Support color ,font size , and custom font. to use custom font, you should use "fast:defaultFont:defaultColor:registedFont" like this:

_label.attributedText = [NSAttributedString fast:@"This is a [*#730000 FMB*]TEST[**]. Org style. [*#008899 24*]by -Thilong."
                                     defaultFont:_label.font
                                    defaultColor:_label.textColor
                                    registedFont:@{
                                                   @"FMB" : [UIFont boldSystemFontOfSize:32]
                                                   }
                         ];

About

Fast create NSAttributedString

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published