Skip to content

Instantly share code, notes, and snippets.

@sturdysturge
Created February 13, 2021 16:04
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 sturdysturge/80d9fec944b1959a8bc85e0c71eddfe8 to your computer and use it in GitHub Desktop.
Save sturdysturge/80d9fec944b1959a8bc85e0c71eddfe8 to your computer and use it in GitHub Desktop.
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 7.0, *)
struct TabItem: View {
var body: some View {
TabView {
View1()
.tabItem {
Image(systemName: "list.dash")
Text("Menu")
}
View2()
.tabItem {
Image(systemName: "square.and.pencil")
Text("Order")
}
}
}
}
struct View1: View {
var body: some View {
Text("View 1")
}
}
struct View2: View {
var body: some View {
Text("View 2")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment