Created
February 22, 2021 07:21
-
-
Save shtnkgm/d8ba240f588d3e73ea13c1ff2e6cb1b5 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
import SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
NavigationView { | |
NavigationLink("Button1", destination: ChildView()) | |
} | |
.navigationViewStyle(StackNavigationViewStyle()) | |
} | |
} | |
struct ChildView: View { | |
@State var isPresented = false | |
var body: some View { | |
Button("Button2") { | |
isPresented = true | |
} | |
.sheet(isPresented: $isPresented) { | |
Text("Sheet") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
RPReplay_Final1613983970.mov