fix: status content warning UI for Dark Mode related issue
This commit is contained in:
parent
5bc8adfd43
commit
1345db9d7e
|
@ -103,7 +103,7 @@ final class StatusView: UIView {
|
||||||
// do not use visual effect view due to we blur text only without background
|
// do not use visual effect view due to we blur text only without background
|
||||||
let contentWarningBlurContentImageView: UIImageView = {
|
let contentWarningBlurContentImageView: UIImageView = {
|
||||||
let imageView = UIImageView()
|
let imageView = UIImageView()
|
||||||
imageView.backgroundColor = .secondarySystemGroupedBackground
|
imageView.backgroundColor = Asset.Colors.Background.secondaryGroupedSystemBackground.color
|
||||||
imageView.layer.masksToBounds = false
|
imageView.layer.masksToBounds = false
|
||||||
return imageView
|
return imageView
|
||||||
}()
|
}()
|
||||||
|
@ -126,6 +126,15 @@ final class StatusView: UIView {
|
||||||
super.init(coder: coder)
|
super.init(coder: coder)
|
||||||
_init()
|
_init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) {
|
||||||
|
super.traitCollectionDidChange(previousTraitCollection)
|
||||||
|
|
||||||
|
// update blur image when interface style changed
|
||||||
|
if previousTraitCollection?.userInterfaceStyle != traitCollection.userInterfaceStyle {
|
||||||
|
drawContentWarningImageView()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ extension StatusTableViewCell {
|
||||||
private func _init() {
|
private func _init() {
|
||||||
selectionStyle = .none
|
selectionStyle = .none
|
||||||
backgroundColor = Asset.Colors.Background.secondaryGroupedSystemBackground.color
|
backgroundColor = Asset.Colors.Background.secondaryGroupedSystemBackground.color
|
||||||
|
statusView.contentWarningBlurContentImageView.backgroundColor = Asset.Colors.Background.secondaryGroupedSystemBackground.color
|
||||||
|
|
||||||
statusView.translatesAutoresizingMaskIntoConstraints = false
|
statusView.translatesAutoresizingMaskIntoConstraints = false
|
||||||
contentView.addSubview(statusView)
|
contentView.addSubview(statusView)
|
||||||
|
|
Loading…
Reference in New Issue