https://github.com/penoty/nsmutableattributedstring-simple
Simplify the process of creating NSMutableAttributeString with block. 使用block实现链式调用,从而简化Objective-c富文本创建过程。
https://github.com/penoty/nsmutableattributedstring-simple
ios nsmutableattributedstring simple
Last synced: 3 months ago
JSON representation
Simplify the process of creating NSMutableAttributeString with block. 使用block实现链式调用,从而简化Objective-c富文本创建过程。
- Host: GitHub
- URL: https://github.com/penoty/nsmutableattributedstring-simple
- Owner: penoty
- Created: 2017-08-14T08:46:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-04T07:02:15.000Z (almost 8 years ago)
- Last Synced: 2025-03-12T07:44:01.888Z (11 months ago)
- Topics: ios, nsmutableattributedstring, simple
- Language: Objective-C
- Homepage:
- Size: 55.7 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NSMutableAttributedString-Simple
Simplify the process of creating NSMutableAttributedString with block. 使用链式调用简化Objective-c富文本创建过程。
NSMutableAttributedString *attributedStr = [NSMutableAttributedString stringWithFormat:@"%@\r\n%@\r\n%@" strings:@[
@"Test1".setBackgroundColor([UIColor redColor]).setSystemFontSize(20.f).setColor([UIColor blueColor]),
@"Test2".setUnderlineColor([UIColor yellowColor]).setUnderlineStyle(@(NSUnderlineStyleThick))
.setSystemFontSize(30.f).setColorWithRGB(0xfb8800),
@"Test3".setStrikelineStyle(@(NSUnderlineStyleThick)).setStrikelineColor([UIColor blueColor])
]];
