I am trying to make side bar in NavigationSplitView with clear background for side bar, so that detail view is visible under sidebar when it is open.In UIKit it is possible to make, when iPhone in portrait mode. How can I make it in SwiftUI? In view debugger I see under side bar hosting controller with white background which I do not know how to change.
Of course background of view which is for side bar is clear. I tried:
struct ContentView: View { /* if iOS < 16 */
var body: some View {
NavigationView {
SideView()
MainView()
}
}
}
struct ContentView: View { /* iOS 16 */
var body: some View {
NavigationSplitView( sidebar: { SideView() },
detail: { MainView() })
}
}
Also I have not found any information and explanation about such behaviour.In UIKit it was possible.If you know some information please explain or attach some links about this behaviour.