Код: Выделить всё
import SwiftUI
struct ContentView: View {
@State private var visibility: NavigationSplitViewVisibility = .all
@State private var isSidebarVisible = true
var body: some View {
NavigationSplitView(columnVisibility: $visibility) {
Color.orange
} content: {
Color.blue
.navigationSplitViewColumnWidth(isSidebarVisible ? 200 : 600)
} detail: {
Color.green
}
.onChange(of: visibility) { oldValue, newValue in
isSidebarVisible = newValue == .all
}
}
}
ссылка на gif of chescurest chorcding
Итак, что мне делать, чтобы заставить его работать?
Подробнее здесь: https://stackoverflow.com/questions/795 ... oesnt-work