Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save iOSappssolutions/976b8255d0985f9c6f89103fb7e7f48b to your computer and use it in GitHub Desktop.
Save iOSappssolutions/976b8255d0985f9c6f89103fb7e7f48b to your computer and use it in GitHub Desktop.
FB18806296
import SwiftUI
struct ContentView: View {
var body: some View {
NavigationSplitView {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
}
.padding()
} detail: {
VStack {
Text("Detail")
.sheet(isPresented: .constant(true)) {
SheetView()
}
}
.navigationBarTitleDisplayMode(.inline)
.toolbarRole(.editor)
.toolbar {
ToolbarItem(placement: .primaryAction) {
Button("test") {
}
}
}
}
}
}
struct SheetView: View {
var body: some View {
NavigationSplitView {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
}
.padding()
} detail: {
Text("Detail")
.toolbar {
ToolbarItem(placement: .primaryAction) {
Button("test") {
}
}
}
}
}
}
#Preview {
ContentView()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment