mirror of
https://github.com/mastodon/mastodon-ios.git
synced 2025-02-03 18:57:46 +01:00
Tweak touch view border color
This commit is contained in:
parent
b634d2b844
commit
6f09034668
@ -23,13 +23,15 @@ private final class TouchView: UIView {
|
|||||||
override init(frame: CGRect) {
|
override init(frame: CGRect) {
|
||||||
super.init(frame: frame)
|
super.init(frame: frame)
|
||||||
|
|
||||||
|
let isLightMode = traitCollection.userInterfaceStyle == .light
|
||||||
|
|
||||||
backgroundColor = .clear
|
backgroundColor = .clear
|
||||||
layer.masksToBounds = true
|
layer.masksToBounds = true
|
||||||
layer.cornerCurve = .circular
|
layer.cornerCurve = .circular
|
||||||
layer.borderColor = UIColor.white.cgColor
|
layer.borderColor = isLightMode ? UIColor.gray.cgColor : UIColor.white.cgColor
|
||||||
layer.borderWidth = 2.0
|
layer.borderWidth = 2.0
|
||||||
|
|
||||||
let blurEffect = traitCollection.userInterfaceStyle == .light ?
|
let blurEffect = isLightMode ?
|
||||||
UIBlurEffect(style: .systemUltraThinMaterialDark) :
|
UIBlurEffect(style: .systemUltraThinMaterialDark) :
|
||||||
UIBlurEffect(style: .systemUltraThinMaterialLight)
|
UIBlurEffect(style: .systemUltraThinMaterialLight)
|
||||||
blurView.effect = blurEffect
|
blurView.effect = blurEffect
|
||||||
|
Loading…
x
Reference in New Issue
Block a user