@@ -40,11 +40,7 @@ public struct ContentView: View {
40
40
startRadiusFraction: 0.3 ,
41
41
endRadiusFraction: 5 )
42
42
43
- private let monitor : DatadogMonitor
44
-
45
- public init ( monitor: DatadogMonitor ) {
46
- self . monitor = monitor
47
-
43
+ public init ( ) {
48
44
// change the background of all the tables
49
45
UITableView . appearance ( ) . backgroundColor = . clear
50
46
}
@@ -70,7 +66,7 @@ public struct ContentView: View {
70
66
}
71
67
. scrollContentBackground ( . hidden)
72
68
. navigationTitle ( " SwiftUI Catalog " )
73
- . modifier ( monitor . viewModifier ( name: " SwiftUI Catalog " ) )
69
+ . trackView ( name: " SwiftUI Catalog " )
74
70
}
75
71
76
72
}
@@ -81,13 +77,15 @@ public struct ContentView: View {
81
77
82
78
private var topHeaderRow : some View {
83
79
Group {
84
- Text ( " A catalog of components, controls, effects, styles and accessibility elements you can use to develop SwiftUI Interfaces in iOS and iPadOS. " )
85
- . font ( . footnote)
86
- . fontWeight ( . light)
87
- . font ( . title2)
88
- . padding ( . top, 24 )
89
- . padding ( . bottom, 16 )
90
- . foregroundColor ( . white)
80
+ PrivacyView ( text: . maskAll) {
81
+ Text ( " A catalog of components, controls, effects, styles and accessibility elements you can use to develop SwiftUI Interfaces in iOS and iPadOS. " )
82
+ . font ( . footnote)
83
+ . fontWeight ( . light)
84
+ . font ( . title2)
85
+ . padding ( . top, 24 )
86
+ . padding ( . bottom, 16 )
87
+ . foregroundColor ( . white)
88
+ }
91
89
92
90
HStack ( alignment: . center, spacing: 2 ) {
93
91
Spacer ( )
@@ -114,31 +112,31 @@ public struct ContentView: View {
114
112
. font ( . title)
115
113
. modifier ( ListSectionFontModifier ( ) ) ) {
116
114
Group {
117
- Link ( destination: ButtonsComponentsView ( ) . modifier ( monitor . viewModifier ( name: " Buttons " ) ) ,
115
+ Link ( destination: ButtonsComponentsView ( ) . trackView ( name: " Buttons " ) ,
118
116
label: " Buttons " )
119
- Link ( destination: ImagesComponentView ( ) . modifier ( monitor . viewModifier ( name: " Images " ) ) ,
117
+ Link ( destination: ImagesComponentView ( ) . trackView ( name: " Images " ) ,
120
118
label: " Images " )
121
- Link ( destination: TextsComponentsView ( ) . modifier ( monitor . viewModifier ( name: " Texts " ) ) ,
119
+ Link ( destination: TextsComponentsView ( ) . trackView ( name: " Texts " ) ,
122
120
label: " Texts " )
123
- Link ( destination: LabelsView ( ) . modifier ( monitor . viewModifier ( name: " Labels " ) ) ,
121
+ Link ( destination: LabelsView ( ) . trackView ( name: " Labels " ) ,
124
122
label: " Labels " )
125
- Link ( destination: MenusComponentView ( ) . modifier ( monitor . viewModifier ( name: " Menus " ) ) ,
123
+ Link ( destination: MenusComponentView ( ) . trackView ( name: " Menus " ) ,
126
124
label: " Menus " )
127
125
}
128
126
Group {
129
- Link ( destination: TogglesView ( ) . modifier ( monitor . viewModifier ( name: " Toggles " ) ) ,
127
+ Link ( destination: TogglesView ( ) . trackView ( name: " Toggles " ) ,
130
128
label: " Toggles " )
131
- Link ( destination: SlidersView ( ) . modifier ( monitor . viewModifier ( name: " Sliders " ) ) ,
129
+ Link ( destination: SlidersView ( ) . trackView ( name: " Sliders " ) ,
132
130
label: " Sliders " )
133
- Link ( destination: SteppersView ( ) . modifier ( monitor . viewModifier ( name: " Steppers " ) ) ,
131
+ Link ( destination: SteppersView ( ) . trackView ( name: " Steppers " ) ,
134
132
label: " Steppers " )
135
- Link ( destination: PickersView ( ) . modifier ( monitor . viewModifier ( name: " Pickers " ) ) ,
133
+ Link ( destination: PickersView ( ) . trackView ( name: " Pickers " ) ,
136
134
label: " Pickers " )
137
- Link ( destination: DatePickersView ( ) . modifier ( monitor . viewModifier ( name: " Date Pickers " ) ) ,
135
+ Link ( destination: DatePickersView ( ) . trackView ( name: " Date Pickers " ) ,
138
136
label: " Date Pickers " )
139
- Link ( destination: ColorPickersView ( ) . modifier ( monitor . viewModifier ( name: " Color Pickers " ) ) ,
137
+ Link ( destination: ColorPickersView ( ) . trackView ( name: " Color Pickers " ) ,
140
138
label: " Color Pickers " )
141
- Link ( destination: ProgressViews ( ) . modifier ( monitor . viewModifier ( name: " Progress View " ) ) ,
139
+ Link ( destination: ProgressViews ( ) . trackView ( name: " Progress View " ) ,
142
140
label: " Progress View " )
143
141
}
144
142
}
@@ -151,7 +149,7 @@ public struct ContentView: View {
151
149
. modifier ( ListSectionFontModifier ( ) ) ) {
152
150
Group {
153
151
Link ( destination: ExampleProductView ( productId: " product.consumable.example.1 " , productImageName: " giftcard.fill " ) ,
154
- label: " Consumable Product View " ) . modifier ( monitor . viewModifier ( name: " Consumable Product View " ) )
152
+ label: " Consumable Product View " ) . trackView ( name: " Consumable Product View " )
155
153
}
156
154
}
157
155
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -162,17 +160,17 @@ public struct ContentView: View {
162
160
Section ( header: Text ( " Layouts " )
163
161
. font ( . title)
164
162
. modifier ( ListSectionFontModifier ( ) ) ) {
165
- Link ( destination: ListsComponentView ( ) . modifier ( monitor . viewModifier ( name: " Lists " ) ) ,
163
+ Link ( destination: ListsComponentView ( ) . trackView ( name: " Lists " ) ,
166
164
label: " Lists " )
167
- Link ( destination: StacksView ( ) . modifier ( monitor . viewModifier ( name: " Stacks " ) ) ,
165
+ Link ( destination: StacksView ( ) . trackView ( name: " Stacks " ) ,
168
166
label: " Stacks " )
169
- Link ( destination: GridsView ( ) . modifier ( monitor . viewModifier ( name: " Grids " ) ) ,
167
+ Link ( destination: GridsView ( ) . trackView ( name: " Grids " ) ,
170
168
label: " Grids " )
171
- Link ( destination: ContainersView ( ) . modifier ( monitor . viewModifier ( name: " Containers " ) ) ,
169
+ Link ( destination: ContainersView ( ) . trackView ( name: " Containers " ) ,
172
170
label: " Containers " )
173
- Link ( destination: ScrollViewsView ( ) . modifier ( monitor . viewModifier ( name: " Scrollviews " ) ) ,
171
+ Link ( destination: ScrollViewsView ( ) . trackView ( name: " Scrollviews " ) ,
174
172
label: " Scrollviews " )
175
- Link ( destination: TableViews ( ) . modifier ( monitor . viewModifier ( name: " Table Views " ) ) ,
173
+ Link ( destination: TableViews ( ) . trackView ( name: " Table Views " ) ,
176
174
label: " Table Views " )
177
175
}
178
176
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -181,13 +179,13 @@ public struct ContentView: View {
181
179
var hierachicalViews : some View {
182
180
Section ( header: Text ( " Hierachical Views " ) . font ( . title)
183
181
. modifier ( ListSectionFontModifier ( ) ) ) {
184
- Link ( destination: NavigationBarsComponentView ( ) . modifier ( monitor . viewModifier ( name: " Navigation " ) ) ,
182
+ Link ( destination: NavigationBarsComponentView ( ) . trackView ( name: " Navigation " ) ,
185
183
label: " Navigation " )
186
- Link ( destination: OutlinesGroupsView ( ) . modifier ( monitor . viewModifier ( name: " Outlines " ) ) ,
184
+ Link ( destination: OutlinesGroupsView ( ) . trackView ( name: " Outlines " ) ,
187
185
label: " Outlines " )
188
- Link ( destination: DisclosureGroupsView ( ) . modifier ( monitor . viewModifier ( name: " Disclosures " ) ) ,
186
+ Link ( destination: DisclosureGroupsView ( ) . trackView ( name: " Disclosures " ) ,
189
187
label: " Disclosures " )
190
- Link ( destination: TabsView ( ) . modifier ( monitor . viewModifier ( name: " Tabs " ) ) ,
188
+ Link ( destination: TabsView ( ) . trackView ( name: " Tabs " ) ,
191
189
label: " Tabs " )
192
190
}
193
191
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -198,15 +196,15 @@ public struct ContentView: View {
198
196
Section ( header: Text ( " Drawing and animations " )
199
197
. font ( . title)
200
198
. modifier ( ListSectionFontModifier ( ) ) ) {
201
- Link ( destination: CanvasView ( ) . modifier ( monitor . viewModifier ( name: " Canvas " ) ) ,
199
+ Link ( destination: CanvasView ( ) . trackView ( name: " Canvas " ) ,
202
200
label: " Canvas " )
203
- Link ( destination: GraphicContextsView ( ) . modifier ( monitor . viewModifier ( name: " Graphic Context " ) ) ,
201
+ Link ( destination: GraphicContextsView ( ) . trackView ( name: " Graphic Context " ) ,
204
202
label: " Graphic Context " )
205
- Link ( destination: ShapesView ( ) . modifier ( monitor . viewModifier ( name: " Shapes " ) ) ,
203
+ Link ( destination: ShapesView ( ) . trackView ( name: " Shapes " ) ,
206
204
label: " Shapes " )
207
- Link ( destination: AnimationsView ( ) . modifier ( monitor . viewModifier ( name: " Animations " ) ) ,
205
+ Link ( destination: AnimationsView ( ) . trackView ( name: " Animations " ) ,
208
206
label: " Animations " )
209
- Link ( destination: GeometriesView ( ) . modifier ( monitor . viewModifier ( name: " Geometries " ) ) ,
207
+ Link ( destination: GeometriesView ( ) . trackView ( name: " Geometries " ) ,
210
208
label: " Geometries " )
211
209
}
212
210
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -218,7 +216,7 @@ public struct ContentView: View {
218
216
Section ( header: Text ( " Charts " )
219
217
. font ( . title)
220
218
. modifier ( ListSectionFontModifier ( ) ) ) {
221
- Link ( destination: ChartsViews ( ) . modifier ( monitor . viewModifier ( name: " Swift Charts " ) ) ,
219
+ Link ( destination: ChartsViews ( ) . trackView ( name: " Swift Charts " ) ,
222
220
label: " Swift Charts " )
223
221
}
224
222
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -229,11 +227,11 @@ public struct ContentView: View {
229
227
Section ( header: Text ( " Gestures " )
230
228
. font ( . title)
231
229
. modifier ( ListSectionFontModifier ( ) ) ) {
232
- Link ( destination: GesturesView ( ) . modifier ( monitor . viewModifier ( name: " Gestures " ) ) ,
230
+ Link ( destination: GesturesView ( ) . trackView ( name: " Gestures " ) ,
233
231
label: " Gestures " )
234
- Link ( destination: ComposingGesturesView ( ) . modifier ( monitor . viewModifier ( name: " Composing Gestures " ) ) ,
232
+ Link ( destination: ComposingGesturesView ( ) . trackView ( name: " Composing Gestures " ) ,
235
233
label: " Composing Gestures " )
236
- Link ( destination: SensoryFeedbackInViews ( ) . modifier ( monitor . viewModifier ( name: " Sensory Feedback " ) ) ,
234
+ Link ( destination: SensoryFeedbackInViews ( ) . trackView ( name: " Sensory Feedback " ) ,
237
235
label: " Sensory Feedback " )
238
236
}
239
237
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -244,11 +242,11 @@ public struct ContentView: View {
244
242
Section ( header: Text ( " View modifiers " )
245
243
. font ( . title)
246
244
. modifier ( ListSectionFontModifier ( ) ) ) {
247
- Link ( destination: TextModifiersView ( ) . modifier ( monitor . viewModifier ( name: " Text modifiers " ) ) ,
245
+ Link ( destination: TextModifiersView ( ) . trackView ( name: " Text modifiers " ) ,
248
246
label: " Text modifiers " )
249
- Link ( destination: EffectsModifiersView ( ) . modifier ( monitor . viewModifier ( name: " Effect modifiers " ) ) ,
247
+ Link ( destination: EffectsModifiersView ( ) . trackView ( name: " Effect modifiers " ) ,
250
248
label: " Effect modifiers " )
251
- Link ( destination: LayoutModifiersView ( ) . modifier ( monitor . viewModifier ( name: " Layout modifiers " ) ) ,
249
+ Link ( destination: LayoutModifiersView ( ) . trackView ( name: " Layout modifiers " ) ,
252
250
label: " Layout modifiers " )
253
251
254
252
}
@@ -261,7 +259,7 @@ public struct ContentView: View {
261
259
. font ( . title)
262
260
. modifier ( ListSectionFontModifier ( ) ) ) {
263
261
264
- Link ( destination: AccesibilityView ( ) . modifier ( monitor . viewModifier ( name: " Accesibility " ) ) ,
262
+ Link ( destination: AccesibilityView ( ) . trackView ( name: " Accesibility " ) ,
265
263
label: " Accesibility " )
266
264
}
267
265
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -272,7 +270,7 @@ public struct ContentView: View {
272
270
Section ( header: Text ( " Status and tool bars " )
273
271
. font ( . title)
274
272
. modifier ( ListSectionFontModifier ( ) ) ) {
275
- Link ( destination: ToolbarsComponentView ( ) . modifier ( monitor . viewModifier ( name: " Tool Bars " ) ) ,
273
+ Link ( destination: ToolbarsComponentView ( ) . trackView ( name: " Tool Bars " ) ,
276
274
label: " Tool Bars " )
277
275
}
278
276
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -284,7 +282,7 @@ public struct ContentView: View {
284
282
. font ( . title)
285
283
. modifier ( ListSectionFontModifier ( ) ) ) {
286
284
287
- Link ( destination: StylesView ( ) . modifier ( monitor . viewModifier ( name: " Styles " ) ) ,
285
+ Link ( destination: StylesView ( ) . trackView ( name: " Styles " ) ,
288
286
label: " Styles " )
289
287
}
290
288
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -298,7 +296,7 @@ public struct ContentView: View {
298
296
299
297
// Link(destination: PopoversComponentView(),
300
298
// label: "Popovers")
301
- Link ( destination: SheetsView ( ) . modifier ( monitor . viewModifier ( name: " Sheets " ) ) ,
299
+ Link ( destination: SheetsView ( ) . trackView ( name: " Sheets " ) ,
302
300
label: " Sheets " )
303
301
// Link(destination: AlertsComponentView(),
304
302
// label: "Alerts")
@@ -315,13 +313,13 @@ public struct ContentView: View {
315
313
Section ( header: Text ( " Composed components to help speed up development " )
316
314
. font ( . title)
317
315
. modifier ( ListSectionFontModifier ( ) ) ) {
318
- Link ( destination: CommonlyUsedViews ( ) . modifier ( monitor . viewModifier ( name: " Commonly used views " ) ) ,
316
+ Link ( destination: CommonlyUsedViews ( ) . trackView ( name: " Commonly used views " ) ,
319
317
label: " Commonly used views " )
320
- Link ( destination: CollectionsViews ( ) . modifier ( monitor . viewModifier ( name: " Collections of components " ) ) ,
318
+ Link ( destination: CollectionsViews ( ) . trackView ( name: " Collections of components " ) ,
321
319
label: " Collections of components " )
322
- Link ( destination: StackedCardsView < CardView > ( elementsCount: 22 ) . modifier ( monitor . viewModifier ( name: " Stacked cards with dragging " ) ) ,
320
+ Link ( destination: StackedCardsView < CardView > ( elementsCount: 22 ) . trackView ( name: " Stacked cards with dragging " ) ,
323
321
label: " Stacked cards with dragging " )
324
- Link ( destination: InterfacingWithUIKitView ( pages: ModelData ( ) . features. map { FeatureCardView ( landmark: $0) } ) . modifier ( monitor . viewModifier ( name: " UIKit Interface " ) ) ,
322
+ Link ( destination: InterfacingWithUIKitView ( pages: ModelData ( ) . features. map { FeatureCardView ( landmark: $0) } ) . trackView ( name: " UIKit Interface " ) ,
325
323
label: " UIKit Interface " )
326
324
}
327
325
. listRowBackground ( Color ( sectionColor, bundle: . module) )
@@ -337,7 +335,7 @@ public struct ContentView: View {
337
335
#Preview {
338
336
339
337
Group {
340
- ContentView ( monitor : NOPDatadogMonitor ( ) )
338
+ ContentView ( )
341
339
. preferredColorScheme ( . dark)
342
340
}
343
341
}
0 commit comments