Skip to content

Instantly share code, notes, and snippets.

@GerardPaligot
Last active March 19, 2022 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GerardPaligot/145ade3611d13c42005ef2c36b0ffc72 to your computer and use it in GitHub Desktop.
Save GerardPaligot/145ade3611d13c42005ef2c36b0ffc72 to your computer and use it in GitHub Desktop.
// AppView.swift - Declare the tabs navigation.
TabView {
AgendaVM(agendaRepository: agendaRepository)
.tabItem {
Label("Agenda", systemImage: "calendar")
}
NetworkingVM(userRepository: userRepository)
.tabItem {
Label("Networking", systemImage: "person.2")
}
EventVM(agendaRepository: agendaRepository)
.tabItem {
Label("Event", systemImage: "ticket")
}
}
// Agenda.swift - Declare my toolbar inside my screen.
NavigationView {
Group {
// You screen here
}
// Toolbar navigation calls inside a NavigationView
.navigationTitle(Text("Agenda"))
.navigationBarTitleDisplayMode(.inline)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment