-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathCaseStudyListStatic.swift
58 lines (56 loc) · 2.21 KB
/
CaseStudyListStatic.swift
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
import SwiftUI
struct CaseStudyListStatic: View {
var body: some View {
List {
Group {
LifecycleMonitor(label: "Child 0")
LifecycleMonitor(label: "Child 1")
LifecycleMonitor(label: "Child 2")
LifecycleMonitor(label: "Child 3")
LifecycleMonitor(label: "Child 4")
LifecycleMonitor(label: "Child 5")
LifecycleMonitor(label: "Child 6")
LifecycleMonitor(label: "Child 7")
LifecycleMonitor(label: "Child 8")
LifecycleMonitor(label: "Child 9")
}
Group {
LifecycleMonitor(label: "Child 10")
LifecycleMonitor(label: "Child 11")
LifecycleMonitor(label: "Child 12")
LifecycleMonitor(label: "Child 13")
LifecycleMonitor(label: "Child 14")
LifecycleMonitor(label: "Child 15")
LifecycleMonitor(label: "Child 16")
LifecycleMonitor(label: "Child 17")
LifecycleMonitor(label: "Child 18")
LifecycleMonitor(label: "Child 19")
}
Group {
LifecycleMonitor(label: "Child 20")
LifecycleMonitor(label: "Child 21")
LifecycleMonitor(label: "Child 22")
LifecycleMonitor(label: "Child 23")
LifecycleMonitor(label: "Child 24")
LifecycleMonitor(label: "Child 25")
LifecycleMonitor(label: "Child 26")
LifecycleMonitor(label: "Child 27")
LifecycleMonitor(label: "Child 28")
LifecycleMonitor(label: "Child 29")
}
}
.safeAreaInset(edge: .bottom) {
Text("Lists with static content recycle their child views too. They behave like dynamic lists.")
.font(.callout)
.padding()
.frame(maxWidth: .infinity, alignment: .leading)
.background(.regularMaterial)
}
.navigationTitle("Static List")
}
}
struct CaseStudyStaticList_Previews: PreviewProvider {
static var previews: some View {
CaseStudyListStatic()
}
}