Skip to content

Instantly share code, notes, and snippets.

@sturdysturge
Created Feb 13, 2021
Embed
What would you like to do?
@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