There was an error while loading. Please reload this page.
1 parent eb91366 commit 7551525Copy full SHA for 7551525
1 file changed
Demo/App.swiftpm/Sources/StacksScreen.swift
@@ -26,7 +26,30 @@ struct StacksScreen: View {
26
Text("Lazy one")
27
Text("Lazy two, longer")
28
}
29
+ Divider()
30
+ ZStackSection(title: "ZStack .center", alignment: .center)
31
+ ZStackSection(title: "ZStack .topLeading", alignment: .topLeading)
32
+ ZStackSection(title: "ZStack .bottomTrailing", alignment: .bottomTrailing)
33
+ }
34
35
36
+}
37
+
38
+struct ZStackSection: View {
39
40
+ let title: String
41
42
+ let alignment: Alignment
43
44
+ var body: some View {
45
+ VStack(spacing: 8) {
46
+ Text(title)
47
+ ZStack(alignment: alignment) {
48
+ Color.blue
49
+ .frame(width: 240, height: 120)
50
+ Text("On top")
51
52
53
54
55
0 commit comments