深色模式添加背景 Swiftui

问题描述 投票:0回答:0

我正在尝试使用 SwiftUI 和黑暗模式解决问题。

我有这个导航按钮代码。

NavigationLink {
    AppInfo()
} label: {
    ZStack {
        Image("info")
             .resizable()
             .frame(width: 36, height: 36)
             .tint(.primaryColor)
    }
    .background(Color.secondaryTextColor)
    .cornerRadius(36)
    .shadow(radius: 4)
}
.position(x: 50, y: frame.size.height-50)

在我的模拟器和设备中正确呈现。

但是在我们的客户身上它添加了一些奇怪的背景。

你有什么想法吗,是什么让它变成这样?

swift swiftui background background-color uibackgroundcolor
© www.soinside.com 2019 - 2024. All rights reserved.