I’ve been looking for how to do this for AGES and I’ve finally found and app made in Swift that has it.
So I really need a bar that stays at the bottom of my screen even when scrolling or changing views that has buttons on it that takes the user to a different view. And I don’t mean like a NavigationLink with a back button and a sliding transition. I mean I want it to open a whole new view and save the user’s location in the other view so when they press the button to return to the previous view they continue where they left off.
This is the GitHub app and they’ve executed exactly what I need:
To be clear this is what I’m talking about:
If anyone has a repository or a YouTube tutorial that has something like this I would be SO grateful. Thanks! :)
Try something like this, to get started:
struct TabScreen: View {
var body: some View {
TabView() {
Text("HomeScreen")
.tabItem {
Image(systemName: "house")
Text("Home")
}
Text("NotificationsScreen")
.tabItem {
Image(systemName: "bell")
Text("Notifications")
}
Text("ExploreScreen")
.tabItem {
Image(systemName: "binoculars")
Text("Explore")
}
Text("ProfileScreen")
.tabItem {
Image(systemName: "person")
Text("Profile")
}
}
}
}