Skip to content

Commit bee3e89

Browse files
authored
Update README.md
1 parent a889ebc commit bee3e89

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

README.md

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
# NSMutableAttributedString-Simple
22
Simplify the process of creating NSMutableAttributedString with block. 使用链式调用简化Objective-c富文本创建过程。
33

4-
NSMutableAttributedString *test = [NSMutableAttributedString stringWithFormat:@"%@ %@\r\n%@" strings:@[
5-
@"Test1".setSystemFontSize(28.f).setColorWithName(@"red")
6-
.setUnderlineStyle(@(NSUnderlineStyleDouble)).setUnderlineColor([UIColor blueColor]),
7-
@"Test2".setBoldSystemFontSize(25.f).setGreenColor()
8-
.setStrikelineStyle(@(NSUnderlineStyleThick)).setStrikelineColor([UIColor blueColor]),
9-
@"Test3".setSystemFontSize(30.f).setColorWithRGB(0xfb8800)
10-
.setUnderlineStyle(@(NSUnderlinePatternDash | NSUnderlineStyleThick)).setUnderlineColor([UIColor blueColor])
11-
.setStrikelineStyle(@(NSUnderlineStyleThick)).setStrikelineColor([UIColor blueColor]),
4+
NSMutableAttributedString *attributedStr = [NSMutableAttributedString stringWithFormat:@"%@\r\n%@\r\n%@" strings:@[
5+
@"Test1".setBackgroundColor([UIColor redColor]).setSystemFontSize(20.f).setColor([UIColor blueColor]),
6+
@"Test2".setUnderlineColor([UIColor yellowColor]).setUnderlineStyle(@(NSUnderlineStyleThick))
7+
.setSystemFontSize(30.f).setColorWithRGB(0xfb8800),
8+
@"Test3".setStrikelineStyle(@(NSUnderlineStyleThick)).setStrikelineColor([UIColor blueColor])
129
]];
1310

14-
![image](https://github.com/penoty/NSMutableAttributeString-Simple/blob/master/test_sample.png )
11+
![image](https://github.com/penoty/NSMutableAttributeString-Simple/blob/master/test.png )

0 commit comments

Comments
 (0)