♻️ :: Move custom colors to config value

This commit is contained in:
Felix Mau
2022-03-09 21:48:21 +01:00
parent 9ca33c4432
commit 25de79f73d
@@ -16,6 +16,12 @@ final class AdvancedExampleViewController: UIViewController {
private enum Config {
/// The programatically applied height of the `GradientActivityIndicatorView`.
static let height: CGFloat = 3.5
/// The custom gradient colors we use.
/// Source: https://color.adobe.com/Pink-Flamingo-color-theme-10343714/
static let gradientColors = [
#colorLiteral(red: 0.9490196078, green: 0.3215686275, blue: 0.431372549, alpha: 1), #colorLiteral(red: 0.9450980392, green: 0.4784313725, blue: 0.5921568627, alpha: 1), #colorLiteral(red: 0.9529411765, green: 0.737254902, blue: 0.7843137255, alpha: 1), #colorLiteral(red: 0.4274509804, green: 0.8666666667, blue: 0.9490196078, alpha: 1), #colorLiteral(red: 0.7568627451, green: 0.9411764706, blue: 0.9568627451, alpha: 1),
]
}
// MARK: - Outlets
@@ -64,10 +70,7 @@ final class AdvancedExampleViewController: UIViewController {
}
private func setupCustomColorsGradientLoadingBar() {
// Source: https://color.adobe.com/Pink-Flamingo-color-theme-10343714/
customColorsGradientLoadingBar.gradientColors = [
#colorLiteral(red: 0.9490196078, green: 0.3215686275, blue: 0.431372549, alpha: 1), #colorLiteral(red: 0.9450980392, green: 0.4784313725, blue: 0.5921568627, alpha: 1), #colorLiteral(red: 0.9529411765, green: 0.737254902, blue: 0.7843137255, alpha: 1), #colorLiteral(red: 0.4274509804, green: 0.8666666667, blue: 0.9490196078, alpha: 1), #colorLiteral(red: 0.7568627451, green: 0.9411764706, blue: 0.9568627451, alpha: 1),
]
customColorsGradientLoadingBar.gradientColors = Config.gradientColors
}
@IBAction private func toggleCustomSuperviewButtonTouchUpInside(_: Any) {