Add extra contrast on the touch views
Felt like they needed to stand out just a bit more in light mode.
This commit is contained in:
parent
5648b13517
commit
b634d2b844
|
@ -10,9 +10,9 @@
|
||||||
import UIKit
|
import UIKit
|
||||||
|
|
||||||
/// View that represents a single touch from the user.
|
/// View that represents a single touch from the user.
|
||||||
fileprivate final class TouchView: UIView {
|
private final class TouchView: UIView {
|
||||||
|
|
||||||
private let blurView: UIVisualEffectView
|
private let blurView = UIVisualEffectView(effect: nil)
|
||||||
|
|
||||||
override var frame: CGRect {
|
override var frame: CGRect {
|
||||||
didSet {
|
didSet {
|
||||||
|
@ -21,9 +21,6 @@ fileprivate final class TouchView: UIView {
|
||||||
}
|
}
|
||||||
|
|
||||||
override init(frame: CGRect) {
|
override init(frame: CGRect) {
|
||||||
let blurEffect = UIBlurEffect(style: .systemUltraThinMaterialLight)
|
|
||||||
blurView = UIVisualEffectView(effect: blurEffect)
|
|
||||||
|
|
||||||
super.init(frame: frame)
|
super.init(frame: frame)
|
||||||
|
|
||||||
backgroundColor = .clear
|
backgroundColor = .clear
|
||||||
|
@ -32,6 +29,10 @@ fileprivate final class TouchView: UIView {
|
||||||
layer.borderColor = UIColor.white.cgColor
|
layer.borderColor = UIColor.white.cgColor
|
||||||
layer.borderWidth = 2.0
|
layer.borderWidth = 2.0
|
||||||
|
|
||||||
|
let blurEffect = traitCollection.userInterfaceStyle == .light ?
|
||||||
|
UIBlurEffect(style: .systemUltraThinMaterialDark) :
|
||||||
|
UIBlurEffect(style: .systemUltraThinMaterialLight)
|
||||||
|
blurView.effect = blurEffect
|
||||||
addSubview(blurView)
|
addSubview(blurView)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue