-
-
Save sturdysturge/80d9fec944b1959a8bc85e0c71eddfe8 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
@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