Created
April 15, 2020 01:22
-
-
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/
This file contains hidden or 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
// 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