From 10b79645dc35c1bac4cfccdfa1e94c12a0b861a9 Mon Sep 17 00:00:00 2001 From: Sam Taylor Date: Fri, 5 Jul 2019 17:52:13 +0100 Subject: [PATCH 1/2] Update README.md with updated NSAttributedString syntax --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7a6928b..539c9b1 100644 --- a/README.md +++ b/README.md @@ -80,9 +80,9 @@ func application(_ application: UIApplication, didFinishLaunchingWithOptions lau Configuring custom title attributes via setTitleTextAttributes method ```swift -let largerRedTextAttributes = [NSAttributedStringKey.font: UIFont.systemFont(ofSize: 16), NSAttributedStringKey.foregroundColor: UIColor.red] -let largerRedTextHighlightAttributes = [NSAttributedStringKey.font: UIFont.systemFont(ofSize: 16), NSAttributedStringKey.foregroundColor: UIColor.blue] -let largerRedTextSelectAttributes = [NSAttributedStringKey.font: UIFont.systemFont(ofSize: 16), NSAttributedStringKey.foregroundColor: UIColor.orange] +let largerRedTextAttributes = [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.red] + let largerRedTextHighlightAttributes = [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.blue] + let largerRedTextSelectAttributes = [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.orange] segmentedControl.setTitleTextAttributes(largerRedTextAttributes, for: .normal) segmentedControl.setTitleTextAttributes(largerRedTextHighlightAttributes, for: .highlighted) From 6f4da14ecc0d7667fec7ed26470e2955ff9456d0 Mon Sep 17 00:00:00 2001 From: Sam Taylor Date: Fri, 5 Jul 2019 17:52:49 +0100 Subject: [PATCH 2/2] Remove whitespace --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 539c9b1..14c57a1 100644 --- a/README.md +++ b/README.md @@ -81,8 +81,8 @@ Configuring custom title attributes via setTitleTextAttributes method ```swift let largerRedTextAttributes = [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.red] - let largerRedTextHighlightAttributes = [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.blue] - let largerRedTextSelectAttributes = [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.orange] +let largerRedTextHighlightAttributes = [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.blue] +let largerRedTextSelectAttributes = [NSAttributedString.Key.font: UIFont.systemFont(ofSize: 16), NSAttributedString.Key.foregroundColor: UIColor.orange] segmentedControl.setTitleTextAttributes(largerRedTextAttributes, for: .normal) segmentedControl.setTitleTextAttributes(largerRedTextHighlightAttributes, for: .highlighted)