Skip to content

Instantly share code, notes, and snippets.

@shtnkgm
Created February 22, 2021 07:21
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 shtnkgm/d8ba240f588d3e73ea13c1ff2e6cb1b5 to your computer and use it in GitHub Desktop.
Save shtnkgm/d8ba240f588d3e73ea13c1ff2e6cb1b5 to your computer and use it in GitHub Desktop.
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")
}
}
}
@shtnkgm
Copy link
Author

shtnkgm commented Feb 22, 2021

RPReplay_Final1613983970.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment