Created
November 4, 2024 17:07
-
-
Save simonnickel/68d532f48cfd0f6d4b8228cc0e0df7c8 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
enum AppDestination: String { | |
case rectangle | |
case circle | |
} | |
struct ContentView: View { | |
@State private var selected: AppDestination = .circle | |
var body: some View { | |
TabView(selection: $selected) { | |
Tab(value: .circle) { | |
Text("Some Text for Circle") | |
} label: { | |
Label { | |
Text("Circle") | |
} icon: { | |
Image(systemName: "circle") | |
} | |
} | |
Tab(value: .rectangle) { | |
Text("Some Text for Rectangle") | |
} label: { | |
Label { | |
Text("Rectangle") | |
} icon: { | |
Image(systemName: "rectangle") | |
} | |
} | |
} | |
.tabViewStyle(.sidebarAdaptable) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment