This commit is contained in:
Vladimir Dubovik
2024-12-11 13:33:35 +03:00
parent 57e241292f
commit 1de531abc8
13 changed files with 325 additions and 132 deletions

View File

@ -8,20 +8,33 @@
import SwiftUI
struct ContentView: View {
@State private var selectedTab: TabBarModel = .schedule
@State private var selectedTab: Int = 1
@StateObject var vm = ViewModel()
var body: some View {
ZStack {
switch selectedTab {
case .schedule:
MainView(vm: vm)
case .tasks:
Text("Tasks")
case .settings:
Text("Settings")
}
TabBarView(selectedTab: $selectedTab)
TabView(selection: $selectedTab) {
Text("Tasks")
.tabItem {
Image(systemName: "books.vertical")
Text("Задания")
}
.tag(0)
MainView(vm: vm)
.tabItem {
Image(systemName: "house")
Text("Расписание")
}
.tag(1)
Text("Settings")
.tabItem {
Image(systemName: "gear")
Text("Настройки")
}
.tag(2)
}
.accentColor(Color("blueColor"))
}
}