fix: setting scene background color not elevated under Dark Mode issue
This commit is contained in:
parent
c4e38e76ee
commit
0b77c19857
|
@ -94,7 +94,7 @@ class SettingsViewController: UIViewController, NeedsDependency {
|
|||
tableView.translatesAutoresizingMaskIntoConstraints = false
|
||||
tableView.delegate = self
|
||||
tableView.rowHeight = UITableView.automaticDimension
|
||||
tableView.backgroundColor = Asset.Colors.Background.systemGroupedBackground.color
|
||||
tableView.backgroundColor = .clear
|
||||
|
||||
tableView.register(SettingsAppearanceTableViewCell.self, forCellReuseIdentifier: String(describing: SettingsAppearanceTableViewCell.self))
|
||||
tableView.register(SettingsToggleTableViewCell.self, forCellReuseIdentifier: String(describing: SettingsToggleTableViewCell.self))
|
||||
|
@ -185,7 +185,14 @@ class SettingsViewController: UIViewController, NeedsDependency {
|
|||
}
|
||||
|
||||
private func setupView() {
|
||||
view.backgroundColor = Asset.Colors.Background.secondarySystemBackground.color
|
||||
view.backgroundColor = UIColor(dynamicProvider: { traitCollection in
|
||||
switch traitCollection.userInterfaceLevel {
|
||||
case .elevated where traitCollection.userInterfaceStyle == .dark:
|
||||
return Asset.Colors.Background.systemElevatedBackground.color
|
||||
default:
|
||||
return Asset.Colors.Background.secondarySystemBackground.color
|
||||
}
|
||||
})
|
||||
setupNavigation()
|
||||
|
||||
view.addSubview(tableView)
|
||||
|
|
|
@ -176,7 +176,7 @@ class SettingsAppearanceTableViewCell: UITableViewCell {
|
|||
|
||||
// MARK: Private methods
|
||||
private func setupUI() {
|
||||
backgroundColor = Asset.Colors.Background.systemGroupedBackground.color
|
||||
backgroundColor = .clear
|
||||
selectionStyle = .none
|
||||
contentView.addSubview(stackView)
|
||||
|
||||
|
|
|
@ -39,7 +39,8 @@ class SettingsSectionHeader: UIView {
|
|||
init(frame: CGRect, customView: UIView? = nil) {
|
||||
super.init(frame: frame)
|
||||
|
||||
backgroundColor = Asset.Colors.Background.systemGroupedBackground.color
|
||||
backgroundColor = .clear
|
||||
|
||||
stackView.addArrangedSubview(titleLabel)
|
||||
if let view = customView {
|
||||
stackView.addArrangedSubview(view)
|
||||
|
|
Loading…
Reference in New Issue