update colors iOS

This commit is contained in:
Maciej Czajka 2023-01-27 10:51:15 +01:00
parent 90c5b805aa
commit 9a1762feb8
3 changed files with 10 additions and 1 deletions

View File

@ -8,20 +8,27 @@
import SwiftUI import SwiftUI
struct MenuView: View { struct MenuView: View {
@Environment(\.colorScheme) var colorScheme
var body: some View { var body: some View {
TabView { TabView {
ContentView() ContentView()
.tabItem { .tabItem {
Image(systemName: "camera") Image(systemName: "camera")
.foregroundColor(Color(colorScheme == .dark ? .white : .black))
Text("Photo") Text("Photo")
.foregroundColor(Color(colorScheme == .dark ? .white : .black))
} }
PlatesListView() PlatesListView()
.tabItem { .tabItem {
Image(systemName: "list.dash") Image(systemName: "list.dash")
.foregroundColor(Color(colorScheme == .dark ? .white : .black))
Text("History") Text("History")
.foregroundColor(Color(colorScheme == .dark ? .white : .black))
} }
} }
.accentColor(Color(.white)) .accentColor(Color(colorScheme == .dark ? .white : .black))
} }
} }

View File

@ -9,6 +9,7 @@ import SwiftUI
struct PlatesListView: View { struct PlatesListView: View {
@Environment(\.colorScheme) var colorScheme
@ObservedObject var imagesList = PlatesList.shared @ObservedObject var imagesList = PlatesList.shared
@State var isPresented: Bool = false @State var isPresented: Bool = false
@ -42,6 +43,7 @@ struct PlatesListView: View {
isPresented.toggle() isPresented.toggle()
} label: { } label: {
Image(systemName: "trash") Image(systemName: "trash")
.foregroundColor(Color(colorScheme == .dark ? .white : .black))
} }
} }
} }