Created
December 31, 2020 18:45
-
-
Save azamsharp/95fa4747700be59ea9ad7805c601a55b to your computer and use it in GitHub Desktop.
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
struct ViewA: View { | |
@State private var isActive: Bool = false | |
var body: some View { | |
VStack { | |
NavigationLink( | |
destination: ViewB(rootActive: $isActive), | |
isActive: $isActive, | |
label: { | |
Text("Go to View B") | |
}) | |
} | |
.frame(maxWidth: .infinity, maxHeight: .infinity) | |
.background(Color.green) | |
.edgesIgnoringSafeArea(.all) | |
.navigationTitle("View A") | |
.embedInNavigationView() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment