2020-12-21 19:28:01 +00:00
|
|
|
//
|
|
|
|
// ContentView.swift
|
|
|
|
// DHBW-Service
|
|
|
|
//
|
|
|
|
// Created by Patrick Müller on 20.12.20.
|
|
|
|
//
|
|
|
|
|
|
|
|
import SwiftUI
|
|
|
|
import CoreData
|
|
|
|
|
|
|
|
struct ContentView: View {
|
2020-12-21 19:54:59 +00:00
|
|
|
@EnvironmentObject var settings: LocalSettings
|
2020-12-21 19:28:01 +00:00
|
|
|
@State private var selection = 0
|
|
|
|
|
|
|
|
var body: some View {
|
2020-12-21 19:54:59 +00:00
|
|
|
Group {
|
|
|
|
if(!settings.isFirstOpening) {
|
|
|
|
TabView(selection: $selection) {
|
|
|
|
HomeView()
|
|
|
|
.tabItem {
|
|
|
|
VStack {
|
|
|
|
Image(systemName: "house.fill")
|
|
|
|
Text("Home")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.tag(0)
|
2020-12-21 19:28:01 +00:00
|
|
|
}
|
2020-12-21 19:54:59 +00:00
|
|
|
} else {
|
2020-12-21 20:01:12 +00:00
|
|
|
FirstOpeningSettings()
|
2020-12-21 19:54:59 +00:00
|
|
|
}
|
2020-12-21 19:28:01 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-12-21 19:54:59 +00:00
|
|
|
extension ContentView{
|
|
|
|
}
|
|
|
|
|
2020-12-21 19:28:01 +00:00
|
|
|
struct ContentView_Previews: PreviewProvider {
|
|
|
|
static var previews: some View {
|
|
|
|
ContentView()
|
|
|
|
.preferredColorScheme(.dark)
|
|
|
|
}
|
|
|
|
}
|