Created
July 12, 2025 22:49
-
-
Save iOSappssolutions/976b8255d0985f9c6f89103fb7e7f48b to your computer and use it in GitHub Desktop.
FB18806296
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 { | |
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