mirror of
https://github.com/Mueller-Patrick/DHBW-Service-App.git
synced 2024-11-01 08:53:58 +00:00
45 lines
1019 B
Swift
45 lines
1019 B
Swift
//
|
|
// ContentView.swift
|
|
// DHBW-Service
|
|
//
|
|
// Created by Patrick Müller on 20.12.20.
|
|
//
|
|
|
|
import SwiftUI
|
|
import CoreData
|
|
|
|
struct ContentView: View {
|
|
@EnvironmentObject var settings: LocalSettings
|
|
@State private var selection = 0
|
|
|
|
var body: some View {
|
|
Group {
|
|
if(!settings.isFirstOpening) {
|
|
TabView(selection: $selection) {
|
|
HomeView()
|
|
.tabItem {
|
|
VStack {
|
|
Image(systemName: "house.fill")
|
|
Text("Home")
|
|
}
|
|
}
|
|
.tag(0)
|
|
}
|
|
} else {
|
|
FirstOpeningSettings()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
extension ContentView{
|
|
}
|
|
|
|
struct ContentView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
ContentView()
|
|
.preferredColorScheme(.dark)
|
|
.environmentObject(LocalSettings())
|
|
}
|
|
}
|