Skip to content

Commit 7fbdc0e

Browse files
committed
WIP
1 parent ac1b7b6 commit 7fbdc0e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+186
-186
lines changed

Examples/Showcase/Showcase/AppView.swift

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ struct AppView: View {
77
#if os(iOS) || os(tvOS) || os(visionOS)
88
.introspect(
99
.window,
10-
on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1)
10+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1)
1111
) { window in
1212
window.backgroundColor = .brown
1313
}
@@ -46,7 +46,7 @@ struct ContentView: View {
4646
.tag(5)
4747
}
4848
#if os(iOS) || os(tvOS)
49-
.introspect(.tabView, on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17)) { tabBarController in
49+
.introspect(.tabView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { tabBarController in
5050
tabBarController.tabBar.layer.backgroundColor = UIColor.green.cgColor
5151
}
5252
#elseif os(macOS)
@@ -83,11 +83,11 @@ struct ListShowcase: View {
8383
Text("Item 2")
8484
}
8585
#if os(iOS) || os(tvOS) || os(visionOS)
86-
.introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17)) { tableView in
86+
.introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { tableView in
8787
tableView.backgroundView = UIView()
8888
tableView.backgroundColor = .cyan
8989
}
90-
.introspect(.list, on: .iOS(.v16, .v17), .visionOS(.v1)) { collectionView in
90+
.introspect(.list, on: .iOS(.v16, .v17, .v18), .visionOS(.v1)) { collectionView in
9191
collectionView.backgroundView = UIView()
9292
collectionView.subviews.dropFirst(1).first?.backgroundColor = .cyan
9393
}
@@ -108,11 +108,11 @@ struct ListShowcase: View {
108108
Text("Item 1")
109109
Text("Item 2")
110110
#if os(iOS) || os(tvOS) || os(visionOS)
111-
.introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor) { tableView in
111+
.introspect(.list, on: .iOS(.v13, .v14, .v15), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), scope: .ancestor) { tableView in
112112
tableView.backgroundView = UIView()
113113
tableView.backgroundColor = .cyan
114114
}
115-
.introspect(.list, on: .iOS(.v16, .v17), .visionOS(.v1), scope: .ancestor) { collectionView in
115+
.introspect(.list, on: .iOS(.v16, .v17, .v18), .visionOS(.v1), scope: .ancestor) { collectionView in
116116
collectionView.backgroundView = UIView()
117117
collectionView.subviews.dropFirst(1).first?.backgroundColor = .cyan
118118
}
@@ -150,7 +150,7 @@ struct ScrollViewShowcase: View {
150150
#if os(iOS) || os(tvOS) || os(visionOS)
151151
.introspect(
152152
.scrollView,
153-
on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1)
153+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1)
154154
) { scrollView in
155155
scrollView.layer.backgroundColor = UIColor.cyan.cgColor
156156
}
@@ -171,7 +171,7 @@ struct ScrollViewShowcase: View {
171171
#if os(iOS) || os(tvOS) || os(visionOS)
172172
.introspect(
173173
.scrollView,
174-
on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1),
174+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1),
175175
scope: .ancestor
176176
) { scrollView in
177177
scrollView.layer.backgroundColor = UIColor.cyan.cgColor
@@ -207,26 +207,26 @@ struct NavigationShowcase: View {
207207
#if os(iOS) || os(tvOS) || os(visionOS)
208208
.introspect(
209209
.navigationView(style: .stack),
210-
on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1)
210+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1)
211211
) { navigationController in
212212
navigationController.navigationBar.backgroundColor = .cyan
213213
}
214214
.introspect(
215215
.navigationView(style: .columns),
216-
on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1)
216+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1)
217217
) { splitViewController in
218218
#if os(visionOS)
219219
splitViewController.preferredDisplayMode = .oneBesideSecondary
220220
#else
221221
splitViewController.preferredDisplayMode = .oneOverSecondary
222222
#endif
223223
}
224-
.introspect(.navigationView(style: .columns), on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { navigationController in
224+
.introspect(.navigationView(style: .columns), on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { navigationController in
225225
navigationController.navigationBar.backgroundColor = .cyan
226226
}
227227
.introspect(
228228
.searchField,
229-
on: .iOS(.v15, .v16, .v17), .tvOS(.v15, .v16, .v17), .visionOS(.v1)
229+
on: .iOS(.v15, .v16, .v17, .v18), .tvOS(.v15, .v16, .v17, .v18), .visionOS(.v1)
230230
) { searchBar in
231231
searchBar.backgroundColor = .red
232232
#if os(iOS)
@@ -251,7 +251,7 @@ struct PresentationShowcase: View {
251251
#if os(iOS) || os(tvOS)
252252
.introspect(
253253
.sheet,
254-
on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17)
254+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)
255255
) { presentationController in
256256
presentationController.containerView?.backgroundColor = .red.withAlphaComponent(0.75)
257257
}
@@ -269,7 +269,7 @@ struct PresentationShowcase: View {
269269
#if os(iOS) || os(tvOS) || os(visionOS)
270270
.introspect(
271271
.fullScreenCover,
272-
on: .iOS(.v14, .v15, .v16, .v17), .tvOS(.v14, .v15, .v16, .v17), .visionOS(.v1)
272+
on: .iOS(.v14, .v15, .v16, .v17, .v18), .tvOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1)
273273
) { presentationController in
274274
presentationController.containerView?.backgroundColor = .red.withAlphaComponent(0.75)
275275
}
@@ -284,7 +284,7 @@ struct PresentationShowcase: View {
284284
.padding()
285285
.introspect(
286286
.popover,
287-
on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1)
287+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1)
288288
) { presentationController in
289289
presentationController.containerView?.backgroundColor = .red.withAlphaComponent(0.75)
290290
}
@@ -305,7 +305,7 @@ struct GenericViewShowcase: View {
305305
#if os(iOS) || os(tvOS) || os(visionOS)
306306
.introspect(
307307
.view,
308-
on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1)
308+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1)
309309
) { view in
310310
view.backgroundColor = .cyan
311311
}
@@ -320,7 +320,7 @@ struct GenericViewShowcase: View {
320320
#if os(iOS) || os(tvOS) || os(visionOS)
321321
.introspect(
322322
.view,
323-
on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1)
323+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1)
324324
) { view in
325325
view.backgroundColor = .lightGray
326326
}
@@ -334,7 +334,7 @@ struct GenericViewShowcase: View {
334334
#if os(iOS) || os(tvOS) || os(visionOS)
335335
.introspect(
336336
.view,
337-
on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1)
337+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1)
338338
) { view in
339339
view.backgroundColor = .blue
340340
}
@@ -348,7 +348,7 @@ struct GenericViewShowcase: View {
348348
#if os(iOS) || os(tvOS) || os(visionOS)
349349
.introspect(
350350
.view,
351-
on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1)
351+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1)
352352
) { view in
353353
view.backgroundColor = .red
354354
}
@@ -375,7 +375,7 @@ struct SimpleElementsShowcase: View {
375375
#if os(iOS) || os(tvOS) || os(visionOS)
376376
.introspect(
377377
.textField,
378-
on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1)
378+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1)
379379
) { textField in
380380
textField.backgroundColor = .red
381381
}
@@ -390,7 +390,7 @@ struct SimpleElementsShowcase: View {
390390
#if os(iOS) || os(tvOS) || os(visionOS)
391391
.introspect(
392392
.textField,
393-
on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1)
393+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1)
394394
) { textField in
395395
textField.backgroundColor = .green
396396
}
@@ -408,7 +408,7 @@ struct SimpleElementsShowcase: View {
408408
#if os(iOS)
409409
.introspect(
410410
.toggle,
411-
on: .iOS(.v13, .v14, .v15, .v16, .v17)
411+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)
412412
) { toggle in
413413
toggle.backgroundColor = .red
414414
}
@@ -422,7 +422,7 @@ struct SimpleElementsShowcase: View {
422422
#if os(iOS)
423423
.introspect(
424424
.toggle,
425-
on: .iOS(.v13, .v14, .v15, .v16, .v17)
425+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)
426426
) { toggle in
427427
toggle.backgroundColor = .green
428428
}
@@ -436,7 +436,7 @@ struct SimpleElementsShowcase: View {
436436
HStack {
437437
Slider(value: $sliderValue, in: 0...100)
438438
#if os(iOS)
439-
.introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { slider in
439+
.introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { slider in
440440
slider.backgroundColor = .red
441441
}
442442
#elseif os(macOS)
@@ -447,7 +447,7 @@ struct SimpleElementsShowcase: View {
447447

448448
Slider(value: $sliderValue, in: 0...100)
449449
#if os(iOS)
450-
.introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { slider in
450+
.introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { slider in
451451
slider.backgroundColor = .green
452452
}
453453
#elseif os(macOS)
@@ -462,7 +462,7 @@ struct SimpleElementsShowcase: View {
462462
Text("Stepper Red")
463463
}
464464
#if os(iOS)
465-
.introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { stepper in
465+
.introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { stepper in
466466
stepper.backgroundColor = .red
467467
}
468468
#elseif os(macOS)
@@ -475,7 +475,7 @@ struct SimpleElementsShowcase: View {
475475
Text("Stepper Green")
476476
}
477477
#if os(iOS)
478-
.introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { stepper in
478+
.introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { stepper in
479479
stepper.backgroundColor = .green
480480
}
481481
#elseif os(macOS)
@@ -491,7 +491,7 @@ struct SimpleElementsShowcase: View {
491491
Text("DatePicker Red")
492492
}
493493
#if os(iOS) || os(visionOS)
494-
.introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1)) { datePicker in
494+
.introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1)) { datePicker in
495495
datePicker.backgroundColor = .red
496496
}
497497
#elseif os(macOS)
@@ -512,7 +512,7 @@ struct SimpleElementsShowcase: View {
512512
#if os(iOS) || os(tvOS) || os(visionOS)
513513
.introspect(
514514
.picker(style: .segmented),
515-
on: .iOS(.v13, .v14, .v15, .v16, .v17), .tvOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1)
515+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1)
516516
) { datePicker in
517517
datePicker.backgroundColor = .red
518518
}

Sources/Introspect.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extension View {
3434
///
3535
/// var body: some View {
3636
/// TextField("Placeholder", text: $text)
37-
/// .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17)) {
37+
/// .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) {
3838
/// print(type(of: $0)) // UITextField
3939
/// }
4040
/// }

Sources/ViewTypes/SignInWithAppleButton.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import SwiftUI
1313
/// } onCompletion: { result in
1414
/// // do something with result
1515
/// }
16-
/// .introspect(.signInWithAppleButton, on: .iOS(.v14, .v15, .v16, .v17)) {
16+
/// .introspect(.signInWithAppleButton, on: .iOS(.v14, .v15, .v16, .v17, .v18)) {
1717
/// print(type(of: $0)) // ASAuthorizationAppleIDButton
1818
/// }
1919
/// }
@@ -30,7 +30,7 @@ import SwiftUI
3030
/// } onCompletion: { result in
3131
/// // do something with result
3232
/// }
33-
/// .introspect(.signInWithAppleButton, on: .tvOS(.v14, .v15, .v16, .v17)) {
33+
/// .introspect(.signInWithAppleButton, on: .tvOS(.v14, .v15, .v16, .v17, .v18)) {
3434
/// print(type(of: $0)) // ASAuthorizationAppleIDButton
3535
/// }
3636
/// }

Tests/Tests/ViewTypes/ColorPickerTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@ final class ColorPickerTests: XCTestCase {
2727
VStack {
2828
ColorPicker("", selection: .constant(PlatformColor.red.cgColor))
2929
#if os(iOS) || os(visionOS)
30-
.introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0)
30+
.introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0)
3131
#elseif os(macOS)
3232
.introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy0)
3333
#endif
3434

3535
ColorPicker("", selection: .constant(PlatformColor.green.cgColor))
3636
#if os(iOS) || os(visionOS)
37-
.introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1)
37+
.introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1)
3838
#elseif os(macOS)
3939
.introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy1)
4040
#endif
4141

4242
ColorPicker("", selection: .constant(PlatformColor.blue.cgColor))
4343
#if os(iOS) || os(visionOS)
44-
.introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2)
44+
.introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2)
4545
#elseif os(macOS)
4646
.introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14), customize: spy2)
4747
#endif

Tests/Tests/ViewTypes/DatePickerTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,23 @@ final class DatePickerTests: XCTestCase {
2424
VStack {
2525
DatePicker("", selection: .constant(date0))
2626
#if os(iOS) || os(visionOS)
27-
.introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy0)
27+
.introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy0)
2828
#elseif os(macOS)
2929
.introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy0)
3030
#endif
3131
.cornerRadius(8)
3232

3333
DatePicker("", selection: .constant(date1))
3434
#if os(iOS) || os(visionOS)
35-
.introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy1)
35+
.introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy1)
3636
#elseif os(macOS)
3737
.introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy1)
3838
#endif
3939
.cornerRadius(8)
4040

4141
DatePicker("", selection: .constant(date2))
4242
#if os(iOS) || os(visionOS)
43-
.introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17), .visionOS(.v1), customize: spy2)
43+
.introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), .visionOS(.v1), customize: spy2)
4444
#elseif os(macOS)
4545
.introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14), customize: spy2)
4646
#endif

0 commit comments

Comments
 (0)