-
-
Save laevandus/9965df40b6b570601759b6d963c20295 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ContentView: View { | |
@State private var selection: Tab = .schedule | |
enum Tab: Int { | |
case conversations, schedule, settings | |
} | |
var body: some View { | |
TabView(selection: $selection) { | |
ConversationListView() | |
.badge(1) | |
.tabItem { | |
Image(systemName: "bubble.left.and.bubble.right.fill") | |
Text("Messages") | |
} | |
.tag(Tab.conversations) | |
ScheduleView() | |
.tabItem { | |
Image(systemName: "clock.fill") | |
Text("Schedule") | |
} | |
.tag(Tab.schedule) | |
SettingsView() | |
.tabItem { | |
Image(systemName: "gearshape.fill") | |
Text("Settings") | |
} | |
.tag(Tab.settings) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment