Commit
This commit is contained in:
@ -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"))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user