Skip to content

Commit 5d9208f

Browse files
committed
WIP
1 parent b3652ad commit 5d9208f

File tree

79 files changed

+213
-173
lines changed

Some content is hidden

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

79 files changed

+213
-173
lines changed

Examples/Showcase/Showcase/AppView.swift

Lines changed: 19 additions & 19 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, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2)
10+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
1111
) { window in
1212
window.backgroundColor = .brown
1313
}
@@ -87,7 +87,7 @@ struct ListShowcase: View {
8787
tableView.backgroundView = UIView()
8888
tableView.backgroundColor = .cyan
8989
}
90-
.introspect(.list, on: .iOS(.v16, .v17, .v18, .v26), .visionOS(.v1, .v2)) { collectionView in
90+
.introspect(.list, on: .iOS(.v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)) { collectionView in
9191
collectionView.backgroundView = UIView()
9292
collectionView.subviews.dropFirst(1).first?.backgroundColor = .cyan
9393
}
@@ -112,7 +112,7 @@ struct ListShowcase: View {
112112
tableView.backgroundView = UIView()
113113
tableView.backgroundColor = .cyan
114114
}
115-
.introspect(.list, on: .iOS(.v16, .v17, .v18, .v26), .visionOS(.v1, .v2), scope: .ancestor) { collectionView in
115+
.introspect(.list, on: .iOS(.v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26), 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, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2)
153+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
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, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2),
174+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26),
175175
scope: .ancestor
176176
) { scrollView in
177177
scrollView.layer.backgroundColor = UIColor.cyan.cgColor
@@ -207,13 +207,13 @@ 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, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2)
210+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
211211
) { navigationController in
212212
navigationController.navigationBar.backgroundColor = .cyan
213213
}
214214
.introspect(
215215
.navigationView(style: .columns),
216-
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2)
216+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
217217
) { splitViewController in
218218
#if os(visionOS)
219219
splitViewController.preferredDisplayMode = .oneBesideSecondary
@@ -226,7 +226,7 @@ struct NavigationShowcase: View {
226226
}
227227
.introspect(
228228
.searchField,
229-
on: .iOS(.v15, .v16, .v17, .v18, .v26), .tvOS(.v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2)
229+
on: .iOS(.v15, .v16, .v17, .v18, .v26), .tvOS(.v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
230230
) { searchBar in
231231
searchBar.backgroundColor = .red
232232
#if os(iOS)
@@ -256,7 +256,7 @@ struct PresentationShowcase: View {
256256
presentationController.containerView?.backgroundColor = .red.withAlphaComponent(0.75)
257257
}
258258
#elseif os(visionOS)
259-
.introspect(.sheet, on: .visionOS(.v1, .v2)) { sheetPresentationController in
259+
.introspect(.sheet, on: .visionOS(.v1, .v2, .v26)) { sheetPresentationController in
260260
sheetPresentationController.containerView?.backgroundColor = .red.withAlphaComponent(0.75)
261261
}
262262
#endif
@@ -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, .v18, .v26), .tvOS(.v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2)
272+
on: .iOS(.v14, .v15, .v16, .v17, .v18, .v26), .tvOS(.v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
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, .v18, .v26), .visionOS(.v1, .v2)
287+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
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, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2)
308+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
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, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2)
323+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
324324
) { view in
325325
view.backgroundColor = .yellow
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, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2)
337+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
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, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2)
351+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
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, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2)
378+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
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, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2)
393+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
394394
) { textField in
395395
textField.backgroundColor = .green
396396
}
@@ -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, .v18, .v26), .visionOS(.v1, .v2)) { datePicker in
494+
.introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)) { 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, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2)
515+
on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .tvOS(.v13, .v14, .v15, .v16, .v17, .v18, .v26), .visionOS(.v1, .v2, .v26)
516516
) { datePicker in
517517
datePicker.backgroundColor = .red
518518
}

Sources/ViewTypes/DatePicker.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import SwiftUI
4343
///
4444
/// var body: some View {
4545
/// DatePicker("Pick a date", selection: $date)
46-
/// .introspect(.datePicker, on: .visionOS(.v1, .v2)) {
46+
/// .introspect(.datePicker, on: .visionOS(.v1, .v2, .v26)) {
4747
/// print(type(of: $0)) // UIDatePicker
4848
/// }
4949
/// }
@@ -70,6 +70,7 @@ extension iOSViewVersion<DatePickerType, UIDatePicker> {
7070
extension visionOSViewVersion<DatePickerType, UIDatePicker> {
7171
public static let v1 = Self(for: .v1)
7272
public static let v2 = Self(for: .v2)
73+
public static let v26 = Self(for: .v26)
7374
}
7475
#elseif canImport(AppKit)
7576
extension macOSViewVersion<DatePickerType, NSDatePicker> {

Sources/ViewTypes/DatePickerWithCompactStyle.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import SwiftUI
4848
/// var body: some View {
4949
/// DatePicker("Pick a date", selection: $date)
5050
/// .datePickerStyle(.compact)
51-
/// .introspect(.datePicker(style: .compact), on: .visionOS(.v1, .v2)) {
51+
/// .introspect(.datePicker(style: .compact), on: .visionOS(.v1, .v2, .v26)) {
5252
/// print(type(of: $0)) // UIDatePicker
5353
/// }
5454
/// }
@@ -80,6 +80,7 @@ extension iOSViewVersion<DatePickerWithCompactStyleType, UIDatePicker> {
8080
extension visionOSViewVersion<DatePickerWithCompactStyleType, UIDatePicker> {
8181
public static let v1 = Self(for: .v1)
8282
public static let v2 = Self(for: .v2)
83+
public static let v26 = Self(for: .v26)
8384
}
8485
#elseif canImport(AppKit) && !targetEnvironment(macCatalyst)
8586
extension macOSViewVersion<DatePickerWithCompactStyleType, NSDatePicker> {

Sources/ViewTypes/DatePickerWithGraphicalStyle.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ import SwiftUI
4848
/// var body: some View {
4949
/// DatePicker("Pick a date", selection: $date)
5050
/// .datePickerStyle(.graphical)
51-
/// .introspect(.datePicker(style: .graphical), on: .visionOS(.v1, .v2)) {
51+
/// .introspect(.datePicker(style: .graphical), on: .visionOS(.v1, .v2, .v26)) {
5252
/// print(type(of: $0)) // UIDatePicker
5353
/// }
5454
/// }
@@ -80,6 +80,7 @@ extension iOSViewVersion<DatePickerWithGraphicalStyleType, UIDatePicker> {
8080
extension visionOSViewVersion<DatePickerWithGraphicalStyleType, UIDatePicker> {
8181
public static let v1 = Self(for: .v1)
8282
public static let v2 = Self(for: .v2)
83+
public static let v26 = Self(for: .v26)
8384
}
8485
#elseif canImport(AppKit) && !targetEnvironment(macCatalyst)
8586
extension macOSViewVersion<DatePickerWithGraphicalStyleType, NSDatePicker> {

Sources/ViewTypes/DatePickerWithWheelStyle.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import SwiftUI
3636
/// var body: some View {
3737
/// DatePicker("Pick a date", selection: $date)
3838
/// .datePickerStyle(.wheel)
39-
/// .introspect(.datePicker(style: .wheel), on: .visionOS(.v1, .v2)) {
39+
/// .introspect(.datePicker(style: .wheel), on: .visionOS(.v1, .v2, .v26)) {
4040
/// print(type(of: $0)) // UIDatePicker
4141
/// }
4242
/// }
@@ -67,6 +67,7 @@ extension iOSViewVersion<DatePickerWithWheelStyleType, UIDatePicker> {
6767
extension visionOSViewVersion<DatePickerWithWheelStyleType, UIDatePicker> {
6868
public static let v1 = Self(for: .v1)
6969
public static let v2 = Self(for: .v2)
70+
public static let v26 = Self(for: .v26)
7071
}
7172
#endif
7273
#endif

Sources/ViewTypes/Form.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ import SwiftUI
5454
/// Text("Item 2")
5555
/// Text("Item 3")
5656
/// }
57-
/// .introspect(.form, on: .visionOS(.v1, .v2)) {
57+
/// .introspect(.form, on: .visionOS(.v1, .v2, .v26)) {
5858
/// print(type(of: $0)) // UICollectionView
5959
/// }
6060
/// }
@@ -94,6 +94,7 @@ extension tvOSViewVersion<FormType, UITableView> {
9494
extension visionOSViewVersion<FormType, UICollectionView> {
9595
public static let v1 = Self(for: .v1)
9696
public static let v2 = Self(for: .v2)
97+
public static let v26 = Self(for: .v26)
9798
}
9899
#endif
99100
#endif

Sources/ViewTypes/FormWithGroupedStyle.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ import SwiftUI
6868
/// Text("Item 3")
6969
/// }
7070
/// .formStyle(.grouped)
71-
/// .introspect(.form(style: .grouped), on: .visionOS(.v1, .v2)) {
71+
/// .introspect(.form(style: .grouped), on: .visionOS(.v1, .v2, .v26)) {
7272
/// print(type(of: $0)) // UICollectionView
7373
/// }
7474
/// }
@@ -117,6 +117,7 @@ extension tvOSViewVersion<FormWithGroupedStyleType, UITableView> {
117117
extension visionOSViewVersion<FormWithGroupedStyleType, UICollectionView> {
118118
public static let v1 = Self(for: .v1)
119119
public static let v2 = Self(for: .v2)
120+
public static let v26 = Self(for: .v26)
120121
}
121122
#elseif canImport(AppKit)
122123
extension macOSViewVersion<FormWithGroupedStyleType, NSScrollView> {

Sources/ViewTypes/FullScreenCover.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ import SwiftUI
5353
/// Button("Present", action: { isPresented = true })
5454
/// .fullScreenCover(isPresented: $isPresented) {
5555
/// Button("Dismiss", action: { isPresented = false })
56-
/// .introspect(.fullScreenCover, on: .visionOS(.v1, .v2)) {
56+
/// .introspect(.fullScreenCover, on: .visionOS(.v1, .v2, .v26)) {
5757
/// print(type(of: $0)) // UIPresentationController
5858
/// }
5959
/// }
@@ -103,6 +103,7 @@ extension tvOSViewVersion<FullScreenCoverType, UIPresentationController> {
103103
extension visionOSViewVersion<FullScreenCoverType, UIPresentationController> {
104104
public static let v1 = Self(for: .v1, selector: selector)
105105
public static let v2 = Self(for: .v2, selector: selector)
106+
public static let v26 = Self(for: .v26, selector: selector)
106107

107108
private static var selector: IntrospectionSelector<UIPresentationController> {
108109
.from(UIViewController.self, selector: { $0.presentationController })

Sources/ViewTypes/List.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ import SwiftUI
6767
/// Text("Item 2")
6868
/// Text("Item 3")
6969
/// }
70-
/// .introspect(.list, on: .visionOS(.v1, .v2)) {
70+
/// .introspect(.list, on: .visionOS(.v1, .v2, .v26)) {
7171
/// print(type(of: $0)) // UICollectionView
7272
/// }
7373
/// }
@@ -111,6 +111,7 @@ extension tvOSViewVersion<ListType, UITableView> {
111111
extension visionOSViewVersion<ListType, UICollectionView> {
112112
public static let v1 = Self(for: .v1)
113113
public static let v2 = Self(for: .v2)
114+
public static let v26 = Self(for: .v26)
114115
}
115116
#elseif canImport(AppKit)
116117
extension macOSViewVersion<ListType, NSTableView> {

Sources/ViewTypes/ListCell.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ import SwiftUI
6565
/// List {
6666
/// ForEach(1...3, id: \.self) { int in
6767
/// Text("Item \(int)")
68-
/// .introspect(.listCell, on: .visionOS(.v1, .v2)) {
68+
/// .introspect(.listCell, on: .visionOS(.v1, .v2, .v26)) {
6969
/// print(type(of: $0)) // UICollectionViewCell
7070
/// }
7171
/// }
@@ -108,6 +108,7 @@ extension tvOSViewVersion<ListCellType, UITableViewCell> {
108108
extension visionOSViewVersion<ListCellType, UICollectionViewCell> {
109109
public static let v1 = Self(for: .v1)
110110
public static let v2 = Self(for: .v2)
111+
public static let v26 = Self(for: .v26)
111112
}
112113
#elseif canImport(AppKit)
113114
extension macOSViewVersion<ListCellType, NSTableCellView> {

0 commit comments

Comments
 (0)