-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContentView.swift
More file actions
30 lines (25 loc) · 810 Bytes
/
ContentView.swift
File metadata and controls
30 lines (25 loc) · 810 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//
// ContentView.swift
// SequentialExecutorExample
//
// Created by DevSven on 2026/3/13.
//
import SwiftUI
struct ContentView: View {
@State private var vm = ViewModel()
@State private var principalCategory: PrincipalCategory = .playground
@ViewBuilder private var selectedView: some View {
switch principalCategory {
case .playground: PlaygroundView(vm: vm).id(PrincipalCategory.playground).transition(.move(edge: .leading).combined(with: .blurReplace))
case .document: DocumentView().id(PrincipalCategory.document).transition(.move(edge: .trailing).combined(with: .blurReplace))
}
}
var body: some View {
selectedView.toolbar {
PrincipalToolbar(selection: $principalCategory)
}
}
}
#Preview {
ContentView()
}