Skip to content

Commit

Permalink
Update README with new convenience initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiekaiger authored Jun 25, 2018
1 parent 4780488 commit 18df307
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Initializing attributed strings in `SwiftyAttributes` can be done several ways:

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

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

extension NSAttributedString {
convenience init(string str: String, attributes: [Attribute])
convenience init(string str: String, swiftyAttributes: [Attribute])
func withAttributes(_ attributes: [Attribute]) -> NSMutableAttributedString
func withAttribute(_ attribute: Attribute) -> NSMutableAttributedString
func attributedSubstring(from range: Range<Int>) -> NSAttributedString
Expand Down

0 comments on commit 18df307

Please sign in to comment.