目前在我的应用程序中,图像我在这个ContentView.swift
文件look fine on an iPhone with its display settings set to Dark mode(第一个图像)然而,当我使用我的模拟器时,这是set to light mode, it doesn't have good contrast(第二个图像).
暗模式图像(好,我希望两者看起来像):
光模式图像(由于对比度低和易读性差):
struct ContentView: View {
@StateObject var sharedVars = SharedVarsBetweenTabs()
var body: some View {
TabView {
HomeView().environmentObject(sharedVars)
.tabItem {
Text("Home")
Image(systemName: "house.fill")
}
AppearanceView().environmentObject(sharedVars)
.tabItem {
Text("Appearance")
Image(systemName: "paintbrush.fill")
}
QuotesView().environmentObject(sharedVars)
.tabItem {
Text("Quotes")
Image(systemName: "quote.bubble.fill")
}
}
.environmentObject(sharedVars)
.accentColor(.blue)
}
}
理想情况下,I simply want them to both look like the dark mode image, regardless of what the user's phone display setting is—因为应用程序的背景是相同的.我将非常感谢任何帮助或建议.