Skip to content

Commit 18df307

Browse files
authored
Update README with new convenience initializer
1 parent 4780488 commit 18df307

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Initializing attributed strings in `SwiftyAttributes` can be done several ways:
6868

6969
- Using the `Attribute` enum in an initializer:
7070
````swift
71-
NSAttributedString(string: "Hello World", attributes: [.kern(5), .backgroundColor(.gray)])
71+
NSAttributedString(string: "Hello World", swiftyAttributes: [.kern(5), .backgroundColor(.gray)])
7272
````
7373

7474
You can retrieve the attribute at a specific location using an attribute name from the `Attribute.Name` enum:
@@ -91,7 +91,7 @@ extension NSMutableAttributedString {
9191
}
9292

9393
extension NSAttributedString {
94-
convenience init(string str: String, attributes: [Attribute])
94+
convenience init(string str: String, swiftyAttributes: [Attribute])
9595
func withAttributes(_ attributes: [Attribute]) -> NSMutableAttributedString
9696
func withAttribute(_ attribute: Attribute) -> NSMutableAttributedString
9797
func attributedSubstring(from range: Range<Int>) -> NSAttributedString

0 commit comments

Comments
 (0)