Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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