SwiftUI,如何在黑暗模式下自定义背景颜色?

问题描述

我使用的customColor具有明暗模式的定义

enter image description here

这是List

    public var body: some View {
        List {
            ForEach(Array(1...5),id: \.self) {
                Text(String($0))
                    .listRowBackground(Color(.customColor))
                    .background(Color(.customColor))

            }
        }
    }

我的问题是分隔符后面的背景颜色仍然是黑色,在黑暗模式下看起来真的很糟糕

enter image description here

enter image description here

有人知道如何解决此问题吗?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)