File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -13,16 +13,16 @@ label.attributedText = [
1313 " This is a string with " ,
1414 UIColor.blueColor ().foregroundAttribute ([
1515 " blue " ,
16- 100 .kernAttribute ([
16+ 100 .kernAttribute (
1717 " kerned"
18- ] ),
18+ ),
1919 " text"
20- ]),
20+ ]. join () ),
2121 " and " ,
2222 UIColor.redColor ().foregroundAttribute ([
2323 NSAttributedString (string : " red" , attributes : [" Custom" : " Value" ]),
2424 " text"
25- ]),
25+ ]. join () ),
2626 " ."
2727].join ().attributedString
2828```
@@ -35,13 +35,13 @@ Any value that conforms to the `AttributedStringConvertible` protocol can be pas
3535Outer attributed values * do not* override inner values, so this code works as expected:
3636
3737``` swift
38- UIColor.greenColor ().foregroundAttribute (
38+ UIColor.greenColor ().foregroundAttribute ([
3939 " There is some " ,
4040 UIColor.blueColor ().foregroundAttribute (
4141 " blue text "
4242 ),
4343 " embedded in this green text."
44- )
44+ ]. join () )
4545```
4646
4747### Attributes
@@ -106,10 +106,10 @@ UIColor.blueColor().foregroundColor([
106106 " This is a blue string with a " ,
107107 attributes (
108108 [" Custom" : " Value" ],
109- [ " custom attribute included" ]
109+ " custom attribute included"
110110 ),
111111 " ."
112- ])
112+ ]. join () )
113113```
114114
115115## Installation
You can’t perform that action at this time.
0 commit comments