From 18df3071bf3b336016402051b7d907dca6c611f3 Mon Sep 17 00:00:00 2001 From: Eddie Kaiger Date: Mon, 25 Jun 2018 12:03:17 -0700 Subject: [PATCH] Update README with new convenience initializer --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bc3972d..82b0e60 100644 --- a/README.md +++ b/README.md @@ -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: @@ -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) -> NSAttributedString