We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a594001 commit 39afd4aCopy full SHA for 39afd4a
Example/HostingExample/ViewController.swift
@@ -66,6 +66,6 @@ class ViewController: NSViewController {
66
67
struct ContentView: View {
68
var body: some View {
69
- ToggleExample()
+ DynamicLayoutViewExample()
70
}
71
Example/SharedExample/Layout/Dynamic/DynamicLayoutViewExample.swift
@@ -0,0 +1,22 @@
1
+//
2
+// DynamicLayoutViewExample.swift
3
+// SharedExample
4
+
5
+#if OPENSWIFTUI
6
+import OpenSwiftUI
7
+#else
8
+import SwiftUI
9
+#endif
10
11
+struct DynamicLayoutViewExample: View {
12
+ @State var show = false
13
+ var body: some View {
14
+ VStack {
15
+ Color.red
16
+ .task { show = true }
17
+ if show {
18
+ Color.blue
19
+ }
20
21
22
+}
0 commit comments