diff --git a/Classes/Settings/Settings.storyboard b/Classes/Settings/Settings.storyboard
index a0bd27593..fbb3eb8f6 100644
--- a/Classes/Settings/Settings.storyboard
+++ b/Classes/Settings/Settings.storyboard
@@ -202,7 +202,7 @@
-
+
@@ -243,7 +243,7 @@
-
+
@@ -272,7 +272,7 @@
-
+
@@ -389,21 +389,21 @@
-
-
+
+
-
+
diff --git a/Classes/Settings/SettingsViewController.swift b/Classes/Settings/SettingsViewController.swift
index 1727ed56e..cc87ead86 100644
--- a/Classes/Settings/SettingsViewController.swift
+++ b/Classes/Settings/SettingsViewController.swift
@@ -48,7 +48,6 @@ NewIssueTableViewControllerDelegate {
signatureSwitch.isOn = Signature.enabled
updateBadge()
- style()
NotificationCenter.default.addObserver(
self,
@@ -253,11 +252,6 @@ NewIssueTableViewControllerDelegate {
NotificationModelController.setReadOnOpen(open: markReadSwitch.isOn)
}
- private func style() {
- [backgroundFetchSwitch, markReadSwitch, signatureSwitch]
- .forEach({ $0.onTintColor = Styles.Colors.Green.medium.color })
- }
-
@IBAction func onSignature(_ sender: Any) {
Signature.enabled = signatureSwitch.isOn
}
diff --git a/Classes/Views/StyledSwitch.swift b/Classes/Views/StyledSwitch.swift
new file mode 100644
index 000000000..af1edc3f8
--- /dev/null
+++ b/Classes/Views/StyledSwitch.swift
@@ -0,0 +1,18 @@
+//
+// StyledSwitch.swift
+// Freetime
+//
+// Created by Ryan Nystrom on 8/11/18.
+// Copyright © 2018 Ryan Nystrom. All rights reserved.
+//
+
+import UIKit
+
+class StyledSwitch: UISwitch {
+
+ override func awakeFromNib() {
+ super.awakeFromNib()
+ onTintColor = Styles.Colors.Green.medium.color
+ }
+
+}
diff --git a/Freetime.xcodeproj/project.pbxproj b/Freetime.xcodeproj/project.pbxproj
index 9628b9c55..1d6a219d1 100644
--- a/Freetime.xcodeproj/project.pbxproj
+++ b/Freetime.xcodeproj/project.pbxproj
@@ -116,6 +116,7 @@
292FF8B91F303DB0009E63F7 /* IssuePreviewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 292FF8B81F303DB0009E63F7 /* IssuePreviewModel.swift */; };
2930988D211F327C00E1178B /* Defaults+Reaction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2930988C211F327B00E1178B /* Defaults+Reaction.swift */; };
2930988F211F32D100E1178B /* DefaultReactionDetailController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2930988E211F32D100E1178B /* DefaultReactionDetailController.swift */; };
+ 29309895211FD7CC00E1178B /* StyledSwitch.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29309894211FD7CC00E1178B /* StyledSwitch.swift */; };
2930F2711F894AA10082BA26 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 2930F2701F894AA10082BA26 /* Settings.bundle */; };
2930F2731F8A27750082BA26 /* WidthCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2930F2721F8A27750082BA26 /* WidthCache.swift */; };
29316DB51ECC7DEB007CAE3F /* ButtonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29316DB41ECC7DEB007CAE3F /* ButtonCell.swift */; };
@@ -630,6 +631,7 @@
292FF8B81F303DB0009E63F7 /* IssuePreviewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IssuePreviewModel.swift; sourceTree = ""; };
2930988C211F327B00E1178B /* Defaults+Reaction.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Defaults+Reaction.swift"; sourceTree = ""; };
2930988E211F32D100E1178B /* DefaultReactionDetailController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DefaultReactionDetailController.swift; sourceTree = ""; };
+ 29309894211FD7CC00E1178B /* StyledSwitch.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StyledSwitch.swift; sourceTree = ""; };
2930F2701F894AA10082BA26 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = SOURCE_ROOT; };
2930F2721F8A27750082BA26 /* WidthCache.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WidthCache.swift; sourceTree = ""; };
29316DB41ECC7DEB007CAE3F /* ButtonCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ButtonCell.swift; sourceTree = ""; };
@@ -1738,6 +1740,7 @@
29C2950F1EC7B7FF00D46CD2 /* ShowMoreDetailsLabel.swift */,
295840701EE9F4D3007723C6 /* ShowMoreDetailsLabel+Date.swift */,
2971722C1F069E96005E43AC /* SpinnerCell.swift */,
+ 29309894211FD7CC00E1178B /* StyledSwitch.swift */,
291929621F3FF0DA0012067B /* StyledTableCell.swift */,
299F63E7205F09900015D901 /* StyledTextRenderer+ListDiffable.swift */,
299F63D9205DD86E0015D901 /* StyledTextViewCell.swift */,
@@ -2950,6 +2953,7 @@
5DB4DD471FC5C10000DF7ABF /* Accessibility.swift in Sources */,
D8BAD0641FDF221900C41071 /* LabelListView.swift in Sources */,
2924C18820D5B2F200FCFCFF /* PeopleSectionController.swift in Sources */,
+ 29309895211FD7CC00E1178B /* StyledSwitch.swift in Sources */,
292ACE181F5C945B00C9A02C /* RepositoryIssueSummaryModel.swift in Sources */,
DCA5ED1B1FAEF78B0072F074 /* BookmarkSectionController.swift in Sources */,
29693EE520FAA05F00336200 /* IssueAutocomplete.swift in Sources */,