From 25411ead452f2b8a6d8545e751fc7a90c0afe31f Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Mon, 28 Oct 2019 00:51:13 -0400 Subject: [PATCH 1/2] Add a highlight background color Adds an IBInspectable background color for the hightlight state. --- iOS/UIKit Extensions/VibrantButton.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/iOS/UIKit Extensions/VibrantButton.swift b/iOS/UIKit Extensions/VibrantButton.swift index dc311d549..51a4a7021 100644 --- a/iOS/UIKit Extensions/VibrantButton.swift +++ b/iOS/UIKit Extensions/VibrantButton.swift @@ -9,6 +9,8 @@ import UIKit class VibrantButton: UIButton { + + @IBInspectable var backgroundHighlightColor: UIColor = AppAssets.secondaryAccentColor override init(frame: CGRect) { super.init(frame: frame) @@ -25,7 +27,7 @@ class VibrantButton: UIButton { override var isHighlighted: Bool { didSet { - backgroundColor = isHighlighted ? AppAssets.secondaryAccentColor : nil + backgroundColor = isHighlighted ? backgroundHighlightColor : nil titleLabel?.alpha = 1 } } From 6e973fb5ed2eb816a623b9664f850ca753a16fca Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Mon, 28 Oct 2019 00:53:09 -0400 Subject: [PATCH 2/2] Set highlight background colors for "Delete Account" This matches the colors from the "Contacts" app --- iOS/Inspector/Inspector.storyboard | 18 ++++++++- .../Contents.json | 38 +++++++++++++++++++ 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 iOS/Resources/Assets.xcassets/deleteBackgroundColor.colorset/Contents.json diff --git a/iOS/Inspector/Inspector.storyboard b/iOS/Inspector/Inspector.storyboard index e87fb1179..c5dfeee7e 100644 --- a/iOS/Inspector/Inspector.storyboard +++ b/iOS/Inspector/Inspector.storyboard @@ -1,8 +1,9 @@ - + - + + @@ -118,6 +119,14 @@ + + + + + + + + @@ -166,4 +175,9 @@ + + + + + diff --git a/iOS/Resources/Assets.xcassets/deleteBackgroundColor.colorset/Contents.json b/iOS/Resources/Assets.xcassets/deleteBackgroundColor.colorset/Contents.json new file mode 100644 index 000000000..1af5a3916 --- /dev/null +++ b/iOS/Resources/Assets.xcassets/deleteBackgroundColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + }, + "colors" : [ + { + "idiom" : "universal", + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "0xD1", + "alpha" : "1.000", + "blue" : "0xD6", + "green" : "0xD1" + } + } + }, + { + "idiom" : "universal", + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "red" : "0x3A", + "alpha" : "1.000", + "blue" : "0x3C", + "green" : "0x3A" + } + } + } + ] +} \ No newline at end of file