Skip to content

Instantly share code, notes, and snippets.

@mahmudahsan
Created April 15, 2020 01:22
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 mahmudahsan/d98e1cd4fed02e96b8c0811a047673dc to your computer and use it in GitHub Desktop.
Save mahmudahsan/d98e1cd4fed02e96b8c0811a047673dc to your computer and use it in GitHub Desktop.
SwiftUI: How to Pop to TabView From NavigationView #4 https://thinkdiff.net/ios/swiftui-how-to-pop-to-tabview-from-navigationview/
// MARK:- View 2
struct View2: View {
@EnvironmentObject var appState: AppState
var body: some View {
VStack {
Text("View 2")
.font(.headline)
Button(action: {
// FIXME:- add move to dashboard functionality
self.appState.reloadDashboard()
}) {
Text("Move to Dashboard")
.font(.headline)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment