Skip to content

Instantly share code, notes, and snippets.

@IhwanID
Created January 10, 2021 01:25
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 IhwanID/4fa17388dd3cd30625ac5094bc9b6b6b to your computer and use it in GitHub Desktop.
Save IhwanID/4fa17388dd3cd30625ac5094bc9b6b6b to your computer and use it in GitHub Desktop.
Create Tab Bar in SwiftUI
struct ContentView: View {
var body: some View {
TabView {
Text("Home Page")
.tabItem {
Image(systemName: "house.fill")
Text("Homeb")
}
Text("Favorite Page")
.tabItem {
Image(systemName: "heart.fill")
Text("Favorite")
}
Text("Profile Page")
.tabItem {
Image(systemName: "person.fill")
Text("Profile")
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment