From 3247d37296c5b52c3f7e7b74c1c0fc0a1200d1cb Mon Sep 17 00:00:00 2001 From: liamcharger <105521623+liamcharger@users.noreply.github.com> Date: Tue, 11 Jun 2024 16:11:48 -0400 Subject: [PATCH 1/9] Add iOS 18 platform version --- Sources/PlatformVersion.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Sources/PlatformVersion.swift b/Sources/PlatformVersion.swift index 5f049047..e56f62ee 100644 --- a/Sources/PlatformVersion.swift +++ b/Sources/PlatformVersion.swift @@ -108,6 +108,20 @@ extension iOSVersion { return nil #endif } + + public static let v18 = iOSVersion { + #if os(iOS) + if #available(iOS 19, *) { + return .past + } + if #available(iOS 18, *) { + return .current + } + return .future + #else + return nil + #endif + } } public struct tvOSVersion: PlatformVersion { From bc8c1be02518100ee13580cd4d83c7107b0ef692 Mon Sep 17 00:00:00 2001 From: liamcharger <105521623+liamcharger@users.noreply.github.com> Date: Tue, 11 Jun 2024 16:12:28 -0400 Subject: [PATCH 2/9] Add tvOS 18 platform version --- Sources/PlatformVersion.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/PlatformVersion.swift b/Sources/PlatformVersion.swift index e56f62ee..63284206 100644 --- a/Sources/PlatformVersion.swift +++ b/Sources/PlatformVersion.swift @@ -191,12 +191,12 @@ extension tvOSVersion { #endif } - public static let v17 = tvOSVersion { + public static let v18 = tvOSVersion { #if os(tvOS) - if #available(tvOS 18, *) { + if #available(tvOS 19, *) { return .past } - if #available(tvOS 17, *) { + if #available(tvOS 18, *) { return .current } return .future From b0cda7e4e308d141bcc0adf8f0da869537f64f71 Mon Sep 17 00:00:00 2001 From: liamcharger <105521623+liamcharger@users.noreply.github.com> Date: Tue, 11 Jun 2024 16:13:28 -0400 Subject: [PATCH 3/9] Add macOS 15 platform target --- Sources/PlatformVersion.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Sources/PlatformVersion.swift b/Sources/PlatformVersion.swift index 63284206..07608708 100644 --- a/Sources/PlatformVersion.swift +++ b/Sources/PlatformVersion.swift @@ -300,6 +300,20 @@ extension macOSVersion { return nil #endif } + + public static let v15 = macOSVersion { + #if os(macOS) + if #available(macOS 16, *) { + return .past + } + if #available(macOS 15, *) { + return .current + } + return .future + #else + return nil + #endif + } } public struct visionOSVersion: PlatformVersion { From d5e0e01b0c699428e2cfd0a599ec6d1e08479c11 Mon Sep 17 00:00:00 2001 From: liamcharger <105521623+liamcharger@users.noreply.github.com> Date: Tue, 11 Jun 2024 16:14:16 -0400 Subject: [PATCH 4/9] Add visionOS 2 platform target --- Sources/PlatformVersion.swift | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Sources/PlatformVersion.swift b/Sources/PlatformVersion.swift index 07608708..86b76d97 100644 --- a/Sources/PlatformVersion.swift +++ b/Sources/PlatformVersion.swift @@ -340,5 +340,19 @@ extension visionOSVersion { return nil #endif } + + public static let v2 = visionOSVersion { + #if os(visionOS) + if #available(visionOS 3, *) { + return .past + } + if #available(visionOS 2, *) { + return .current + } + return .future + #else + return nil + #endif + } } #endif From 7ea402eaa532d5ac703804475a5635ceba11bef8 Mon Sep 17 00:00:00 2001 From: liamcharger <105521623+liamcharger@users.noreply.github.com> Date: Tue, 11 Jun 2024 16:19:59 -0400 Subject: [PATCH 5/9] Update README.md --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 56673625..9fbf0d44 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ For instance, when introspecting a `ScrollView`... ScrollView { Text("Item 1") } -.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { scrollView in +.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { scrollView in // do something with UIScrollView } ``` @@ -38,7 +38,7 @@ By default, the `.introspect` modifier acts directly on its _receiver_. This mea ```swift ScrollView { Text("Item 1") - .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17), scope: .ancestor) { scrollView in + .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18), scope: .ancestor) { scrollView in // do something with UIScrollView } } @@ -157,7 +157,7 @@ List { tableView.backgroundView = UIView() tableView.backgroundColor = .cyan } -.introspect(.list, on: .iOS(.v16, .v17)) { collectionView in +.introspect(.list, on: .iOS(.v16, .v17, .v18)) { collectionView in collectionView.backgroundView = UIView() collectionView.subviews.dropFirst(1).first?.backgroundColor = .cyan } @@ -169,7 +169,7 @@ List { ScrollView { Text("Item") } -.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { scrollView in +.introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { scrollView in scrollView.backgroundColor = .red } ``` @@ -181,7 +181,7 @@ NavigationView { Text("Item") } .navigationViewStyle(.stack) -.introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16, .v17)) { navigationController in +.introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { navigationController in navigationController.navigationBar.backgroundColor = .cyan } ``` @@ -190,7 +190,7 @@ NavigationView { ```swift TextField("Text Field", text: <#Binding#>) - .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { textField in + .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { textField in textField.backgroundColor = .red } ``` @@ -286,7 +286,7 @@ struct ContentView: View { ScrollView { // ... } - .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { scrollView in + .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { scrollView in self.scrollView = scrollView } } From 5d9a99c514fcebba7981b6cba71bf3a2a22d8832 Mon Sep 17 00:00:00 2001 From: liamcharger Date: Tue, 11 Jun 2024 17:33:56 -0400 Subject: [PATCH 6/9] Add platforms to components --- Sources/PlatformVersion.swift | 14 ++++++++++++++ Sources/ViewTypes/Button.swift | 3 ++- Sources/ViewTypes/ColorPicker.swift | 6 ++++-- Sources/ViewTypes/DatePicker.swift | 9 ++++++--- .../ViewTypes/DatePickerWithCompactStyle.swift | 9 ++++++--- Sources/ViewTypes/DatePickerWithFieldStyle.swift | 3 ++- .../ViewTypes/DatePickerWithGraphicalStyle.swift | 9 ++++++--- .../DatePickerWithStepperFieldStyle.swift | 3 ++- Sources/ViewTypes/DatePickerWithWheelStyle.swift | 6 ++++-- Sources/ViewTypes/Form.swift | 9 ++++++--- Sources/ViewTypes/FormWithGroupedStyle.swift | 11 +++++++---- Sources/ViewTypes/FullScreenCover.swift | 9 ++++++--- Sources/ViewTypes/List.swift | 12 ++++++++---- Sources/ViewTypes/ListCell.swift | 12 ++++++++---- Sources/ViewTypes/ListWithBorderedStyle.swift | 3 ++- Sources/ViewTypes/ListWithGroupedStyle.swift | 9 ++++++--- Sources/ViewTypes/ListWithInsetGroupedStyle.swift | 6 ++++-- Sources/ViewTypes/ListWithInsetStyle.swift | 9 ++++++--- Sources/ViewTypes/ListWithSidebarStyle.swift | 9 ++++++--- Sources/ViewTypes/Map.swift | 11 +++++++---- Sources/ViewTypes/NavigationSplitView.swift | 12 ++++++++---- Sources/ViewTypes/NavigationStack.swift | 9 ++++++--- .../NavigationViewWithColumnsStyle.swift | 12 ++++++++---- .../ViewTypes/NavigationViewWithStackStyle.swift | 9 ++++++--- Sources/ViewTypes/PageControl.swift | 9 ++++++--- Sources/ViewTypes/PickerWithMenuStyle.swift | 3 ++- Sources/ViewTypes/PickerWithSegmentedStyle.swift | 12 ++++++++---- Sources/ViewTypes/PickerWithWheelStyle.swift | 6 ++++-- Sources/ViewTypes/Popover.swift | 6 ++++-- .../ViewTypes/ProgressViewWithCircularStyle.swift | 12 ++++++++---- .../ViewTypes/ProgressViewWithLinearStyle.swift | 12 ++++++++---- Sources/ViewTypes/ScrollView.swift | 12 ++++++++---- Sources/ViewTypes/SearchField.swift | 9 ++++++--- Sources/ViewTypes/SecureField.swift | 12 ++++++++---- Sources/ViewTypes/Sheet.swift | 11 ++++++++--- Sources/ViewTypes/Slider.swift | 6 ++++-- Sources/ViewTypes/Stepper.swift | 6 ++++-- Sources/ViewTypes/TabView.swift | 9 ++++++--- Sources/ViewTypes/TabViewWithPageStyle.swift | 9 ++++++--- Sources/ViewTypes/Table.swift | 9 ++++++--- Sources/ViewTypes/TextEditor.swift | 9 ++++++--- Sources/ViewTypes/TextField.swift | 12 ++++++++---- Sources/ViewTypes/TextFieldWithVerticalAxis.swift | 13 ++++++++----- Sources/ViewTypes/Toggle.swift | 6 ++++-- Sources/ViewTypes/ToggleWithButtonStyle.swift | 3 ++- Sources/ViewTypes/ToggleWithCheckboxStyle.swift | 3 ++- Sources/ViewTypes/ToggleWithSwitchStyle.swift | 6 ++++-- Sources/ViewTypes/VideoPlayer.swift | 12 ++++++++---- Sources/ViewTypes/View.swift | 12 ++++++++---- Sources/ViewTypes/ViewController.swift | 15 +++++++++------ Sources/ViewTypes/Window.swift | 13 ++++++++----- 51 files changed, 303 insertions(+), 148 deletions(-) diff --git a/Sources/PlatformVersion.swift b/Sources/PlatformVersion.swift index 86b76d97..2600bc7f 100644 --- a/Sources/PlatformVersion.swift +++ b/Sources/PlatformVersion.swift @@ -190,6 +190,20 @@ extension tvOSVersion { return nil #endif } + + public static let v17 = tvOSVersion { +#if os(tvOS) + if #available(tvOS 18, *) { + return .past + } + if #available(tvOS 17, *) { + return .current + } + return .future +#else + return nil +#endif + } public static let v18 = tvOSVersion { #if os(tvOS) diff --git a/Sources/ViewTypes/Button.swift b/Sources/ViewTypes/Button.swift index 6e61b32d..aa8a591a 100644 --- a/Sources/ViewTypes/Button.swift +++ b/Sources/ViewTypes/Button.swift @@ -17,7 +17,7 @@ import SwiftUI /// struct ContentView: View { /// var body: some View { /// Button("Action", action: {}) -/// .introspect(.button, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.button, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSButton /// } /// } @@ -41,6 +41,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ColorPicker.swift b/Sources/ViewTypes/ColorPicker.swift index 13488066..3aa7f8dd 100644 --- a/Sources/ViewTypes/ColorPicker.swift +++ b/Sources/ViewTypes/ColorPicker.swift @@ -11,7 +11,7 @@ import SwiftUI /// /// var body: some View { /// ColorPicker("Pick a color", selection: $color) -/// .introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.colorPicker, on: .iOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIColorPicker /// } /// } @@ -30,7 +30,7 @@ import SwiftUI /// /// var body: some View { /// ColorPicker("Pick a color", selection: $color) -/// .introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14)) { +/// .introspect(.colorPicker, on: .macOS(.v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSColorPicker /// } /// } @@ -67,6 +67,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } @available(iOS 14, *) @@ -82,6 +83,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePicker.swift b/Sources/ViewTypes/DatePicker.swift index 8e733e81..7ee07098 100644 --- a/Sources/ViewTypes/DatePicker.swift +++ b/Sources/ViewTypes/DatePicker.swift @@ -11,7 +11,7 @@ import SwiftUI /// /// var body: some View { /// DatePicker("Pick a date", selection: $date) -/// .introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.datePicker, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIDatePicker /// } /// } @@ -28,7 +28,7 @@ import SwiftUI /// /// var body: some View { /// DatePicker("Pick a date", selection: $date) -/// .introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.datePicker, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSDatePicker /// } /// } @@ -43,7 +43,7 @@ import SwiftUI /// /// var body: some View { /// DatePicker("Pick a date", selection: $date) -/// .introspect(.datePicker, on: .visionOS(.v1)) { +/// .introspect(.datePicker, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UIDatePicker /// } /// } @@ -63,10 +63,12 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -75,6 +77,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePickerWithCompactStyle.swift b/Sources/ViewTypes/DatePickerWithCompactStyle.swift index 5485b3b1..c4d92e97 100644 --- a/Sources/ViewTypes/DatePickerWithCompactStyle.swift +++ b/Sources/ViewTypes/DatePickerWithCompactStyle.swift @@ -12,7 +12,7 @@ import SwiftUI /// var body: some View { /// DatePicker("Pick a date", selection: $date) /// .datePickerStyle(.compact) -/// .introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.datePicker(style: .compact), on: .iOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIDatePicker /// } /// } @@ -32,7 +32,7 @@ import SwiftUI /// var body: some View { /// DatePicker("Pick a date", selection: $date) /// .datePickerStyle(.compact) -/// .introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14)) { +/// .introspect(.datePicker(style: .compact), on: .macOS(.v10_15_4, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSDatePicker /// } /// } @@ -48,7 +48,7 @@ import SwiftUI /// var body: some View { /// DatePicker("Pick a date", selection: $date) /// .datePickerStyle(.compact) -/// .introspect(.datePicker(style: .compact), on: .visionOS(.v1)) { +/// .introspect(.datePicker(style: .compact), on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UIDatePicker /// } /// } @@ -73,10 +73,12 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v1 = Self(for: .v2) } #elseif canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { @@ -87,6 +89,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePickerWithFieldStyle.swift b/Sources/ViewTypes/DatePickerWithFieldStyle.swift index 1dca2a4a..eaf416b6 100644 --- a/Sources/ViewTypes/DatePickerWithFieldStyle.swift +++ b/Sources/ViewTypes/DatePickerWithFieldStyle.swift @@ -20,7 +20,7 @@ import SwiftUI /// var body: some View { /// DatePicker("Pick a date", selection: $date) /// .datePickerStyle(.field) -/// .introspect(.datePicker(style: .field), on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.datePicker(style: .field), on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSDatePicker /// } /// } @@ -48,6 +48,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift b/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift index be195506..4c611554 100644 --- a/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift +++ b/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift @@ -12,7 +12,7 @@ import SwiftUI /// var body: some View { /// DatePicker("Pick a date", selection: $date) /// .datePickerStyle(.graphical) -/// .introspect(.datePicker(style: .graphical), on: .iOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.datePicker(style: .graphical), on: .iOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIDatePicker /// } /// } @@ -32,7 +32,7 @@ import SwiftUI /// var body: some View { /// DatePicker("Pick a date", selection: $date) /// .datePickerStyle(.graphical) -/// .introspect(.datePicker(style: .graphical), on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.datePicker(style: .graphical), on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSDatePicker /// } /// } @@ -48,7 +48,7 @@ import SwiftUI /// var body: some View { /// DatePicker("Pick a date", selection: $date) /// .datePickerStyle(.graphical) -/// .introspect(.datePicker(style: .graphical), on: .visionOS(.v1)) { +/// .introspect(.datePicker(style: .graphical), on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UIDatePicker /// } /// } @@ -73,10 +73,12 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { @@ -85,6 +87,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift b/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift index b025c862..da09d7c0 100644 --- a/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift +++ b/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift @@ -20,7 +20,7 @@ import SwiftUI /// var body: some View { /// DatePicker("Pick a date", selection: $date) /// .datePickerStyle(.stepperField) -/// .introspect(.datePicker(style: .stepperField), on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.datePicker(style: .stepperField), on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSDatePicker /// } /// } @@ -48,6 +48,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/DatePickerWithWheelStyle.swift b/Sources/ViewTypes/DatePickerWithWheelStyle.swift index c290af6d..d0a59f4a 100644 --- a/Sources/ViewTypes/DatePickerWithWheelStyle.swift +++ b/Sources/ViewTypes/DatePickerWithWheelStyle.swift @@ -12,7 +12,7 @@ import SwiftUI /// var body: some View { /// DatePicker("Pick a date", selection: $date) /// .datePickerStyle(.wheel) -/// .introspect(.datePicker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.datePicker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIDatePicker /// } /// } @@ -36,7 +36,7 @@ import SwiftUI /// var body: some View { /// DatePicker("Pick a date", selection: $date) /// .datePickerStyle(.wheel) -/// .introspect(.datePicker(style: .wheel), on: .visionOS(.v1)) { +/// .introspect(.datePicker(style: .wheel), on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UIDatePicker /// } /// } @@ -60,10 +60,12 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/Form.swift b/Sources/ViewTypes/Form.swift index 4f456f33..92f3ffd7 100644 --- a/Sources/ViewTypes/Form.swift +++ b/Sources/ViewTypes/Form.swift @@ -16,7 +16,7 @@ import SwiftUI /// .introspect(.form, on: .iOS(.v13, .v14, .v15)) { /// print(type(of: $0)) // UITableView /// } -/// .introspect(.form, on: .iOS(.v16, .v17)) { +/// .introspect(.form, on: .iOS(.v16, .v17, .v18)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -33,7 +33,7 @@ import SwiftUI /// Text("Item 2") /// Text("Item 3") /// } -/// .introspect(.form, on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.form, on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UITableView /// } /// } @@ -54,7 +54,7 @@ import SwiftUI /// Text("Item 2") /// Text("Item 3") /// } -/// .introspect(.form, on: .visionOS(.v1)) { +/// .introspect(.form, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -77,6 +77,7 @@ extension iOSViewVersion { extension iOSViewVersion { public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @@ -85,10 +86,12 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/FormWithGroupedStyle.swift b/Sources/ViewTypes/FormWithGroupedStyle.swift index 5b6a2924..88fc68e5 100644 --- a/Sources/ViewTypes/FormWithGroupedStyle.swift +++ b/Sources/ViewTypes/FormWithGroupedStyle.swift @@ -14,7 +14,7 @@ import SwiftUI /// Text("Item 3") /// } /// .formStyle(.grouped) -/// .introspect(.form(style: .grouped), on: .iOS(.v16, .v17)) { +/// .introspect(.form(style: .grouped), on: .iOS(.v16, .v17, .v18)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -32,7 +32,7 @@ import SwiftUI /// Text("Item 3") /// } /// .formStyle(.grouped) -/// .introspect(.form(style: .grouped), on: .tvOS(.v16, .v17)) { +/// .introspect(.form(style: .grouped), on: .tvOS(.v16, .v17, .v18)) { /// print(type(of: $0)) // UITableView /// } /// } @@ -50,7 +50,7 @@ import SwiftUI /// Text("Item 3") /// } /// .formStyle(.grouped) -/// .introspect(.form(style: .grouped), on: .macOS(.v13, .v14)) { +/// .introspect(.form(style: .grouped), on: .macOS(.v13, .v14, .v15)) { /// print(type(of: $0)) // NSScrollView /// } /// } @@ -68,7 +68,7 @@ import SwiftUI /// Text("Item 3") /// } /// .formStyle(.grouped) -/// .introspect(.form(style: .grouped), on: .visionOS(.v1)) { +/// .introspect(.form(style: .grouped), on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -97,6 +97,7 @@ extension iOSViewVersion { extension iOSViewVersion { public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @@ -108,6 +109,7 @@ extension tvOSViewVersion { public static let v15 = Self.unavailable() public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { @@ -123,6 +125,7 @@ extension macOSViewVersion { public static let v12 = Self.unavailable() public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/FullScreenCover.swift b/Sources/ViewTypes/FullScreenCover.swift index af23447c..e9a814d6 100644 --- a/Sources/ViewTypes/FullScreenCover.swift +++ b/Sources/ViewTypes/FullScreenCover.swift @@ -13,7 +13,7 @@ import SwiftUI /// Button("Present", action: { isPresented = true }) /// .fullScreenCover(isPresented: $isPresented) { /// Button("Dismiss", action: { isPresented = false }) -/// .introspect(.fullScreenCover, on: .iOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.fullScreenCover, on: .iOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIPresentationController /// } /// } @@ -31,7 +31,7 @@ import SwiftUI /// Button("Present", action: { isPresented = true }) /// .fullScreenCover(isPresented: $isPresented) { /// Button("Dismiss", action: { isPresented = false }) -/// .introspect(.fullScreenCover, on: .tvOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.fullScreenCover, on: .tvOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIPresentationController /// } /// } @@ -53,7 +53,7 @@ import SwiftUI /// Button("Present", action: { isPresented = true }) /// .fullScreenCover(isPresented: $isPresented) { /// Button("Dismiss", action: { isPresented = false }) -/// .introspect(.fullScreenCover, on: .visionOS(.v1)) { +/// .introspect(.fullScreenCover, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UIPresentationController /// } /// } @@ -77,6 +77,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15, selector: selector) public static let v16 = Self(for: .v16, selector: selector) public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.presentationController) @@ -90,6 +91,7 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15, selector: selector) public static let v16 = Self(for: .v16, selector: selector) public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.presentationController) @@ -98,6 +100,7 @@ extension tvOSViewVersion { extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.presentationController) diff --git a/Sources/ViewTypes/List.swift b/Sources/ViewTypes/List.swift index c7f67aba..9733f894 100644 --- a/Sources/ViewTypes/List.swift +++ b/Sources/ViewTypes/List.swift @@ -16,7 +16,7 @@ import SwiftUI /// .introspect(.list, on: .iOS(.v13, .v14, .v15)) { /// print(type(of: $0)) // UITableView /// } -/// .introspect(.list, on: .iOS(.v16, .v17)) { +/// .introspect(.list, on: .iOS(.v16, .v17, .v18)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -33,7 +33,7 @@ import SwiftUI /// Text("Item 2") /// Text("Item 3") /// } -/// .introspect(.list, on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.list, on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UITableView /// } /// } @@ -50,7 +50,7 @@ import SwiftUI /// Text("Item 2") /// Text("Item 3") /// } -/// .introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.list, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSTableView /// } /// } @@ -67,7 +67,7 @@ import SwiftUI /// Text("Item 2") /// Text("Item 3") /// } -/// .introspect(.list, on: .visionOS(.v1)) { +/// .introspect(.list, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -94,6 +94,7 @@ extension iOSViewVersion { extension iOSViewVersion { public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @@ -102,10 +103,12 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -114,6 +117,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ListCell.swift b/Sources/ViewTypes/ListCell.swift index 3d03540a..3684e6b6 100644 --- a/Sources/ViewTypes/ListCell.swift +++ b/Sources/ViewTypes/ListCell.swift @@ -14,7 +14,7 @@ import SwiftUI /// .introspect(.listCell, on: .iOS(.v13, .v14, .v15)) { /// print(type(of: $0)) // UITableViewCell /// } -/// .introspect(.listCell, on: .iOS(.v16, .v17)) { +/// .introspect(.listCell, on: .iOS(.v16, .v17, .v18)) { /// print(type(of: $0)) // UICollectionViewCell /// } /// } @@ -31,7 +31,7 @@ import SwiftUI /// List { /// ForEach(1...3, id: \.self) { int in /// Text("Item \(int)") -/// .introspect(.listCell, on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.listCell, on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UITableViewCell /// } /// } @@ -48,7 +48,7 @@ import SwiftUI /// List { /// ForEach(1...3, id: \.self) { int in /// Text("Item \(int)") -/// .introspect(.listCell, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.listCell, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSTableCellView /// } /// } @@ -65,7 +65,7 @@ import SwiftUI /// List { /// ForEach(1...3, id: \.self) { int in /// Text("Item \(int)") -/// .introspect(.listCell, on: .visionOS(.v1)) { +/// .introspect(.listCell, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UICollectionViewCell /// } /// } @@ -91,6 +91,7 @@ extension iOSViewVersion { extension iOSViewVersion { public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @@ -99,10 +100,12 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -111,6 +114,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ListWithBorderedStyle.swift b/Sources/ViewTypes/ListWithBorderedStyle.swift index e77d2a2f..c02bb525 100644 --- a/Sources/ViewTypes/ListWithBorderedStyle.swift +++ b/Sources/ViewTypes/ListWithBorderedStyle.swift @@ -22,7 +22,7 @@ import SwiftUI /// Text("Item 3") /// } /// .listStyle(.bordered) -/// .introspect(.list(style: .bordered), on: .macOS(.v12, .v13, .v14)) { +/// .introspect(.list(style: .bordered), on: .macOS(.v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSTableView /// } /// } @@ -52,6 +52,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ListWithGroupedStyle.swift b/Sources/ViewTypes/ListWithGroupedStyle.swift index 28f9127d..0e7f1129 100644 --- a/Sources/ViewTypes/ListWithGroupedStyle.swift +++ b/Sources/ViewTypes/ListWithGroupedStyle.swift @@ -17,7 +17,7 @@ import SwiftUI /// .introspect(.list(style: .grouped), on: .iOS(.v13, .v14, .v15)) { /// print(type(of: $0)) // UITableView /// } -/// .introspect(.list(style: .grouped), on: .iOS(.v16, .v17)) { +/// .introspect(.list(style: .grouped), on: .iOS(.v16, .v17, .v18)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -35,7 +35,7 @@ import SwiftUI /// Text("Item 3") /// } /// .listStyle(.grouped) -/// .introspect(.list(style: .grouped), on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.list(style: .grouped), on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UITableView /// } /// } @@ -57,7 +57,7 @@ import SwiftUI /// Text("Item 3") /// } /// .listStyle(.grouped) -/// .introspect(.list(style: .grouped), on: .visionOS(.v1)) { +/// .introspect(.list(style: .grouped), on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -84,6 +84,7 @@ extension iOSViewVersion { extension iOSViewVersion { public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @@ -92,10 +93,12 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/ListWithInsetGroupedStyle.swift b/Sources/ViewTypes/ListWithInsetGroupedStyle.swift index 51867262..d28e2e76 100644 --- a/Sources/ViewTypes/ListWithInsetGroupedStyle.swift +++ b/Sources/ViewTypes/ListWithInsetGroupedStyle.swift @@ -17,7 +17,7 @@ import SwiftUI /// .introspect(.list(style: .insetGrouped), on: .iOS(.v14, .v15)) { /// print(type(of: $0)) // UITableView /// } -/// .introspect(.list(style: .insetGrouped), on: .iOS(.v16, .v17)) { +/// .introspect(.list(style: .insetGrouped), on: .iOS(.v16, .v17, .v18)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -43,7 +43,7 @@ import SwiftUI /// Text("Item 3") /// } /// .listStyle(.insetGrouped) -/// .introspect(.list(style: .insetGrouped), on: .visionOS(.v1)) { +/// .introspect(.list(style: .insetGrouped), on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -71,10 +71,12 @@ extension iOSViewVersion { extension iOSViewVersion { public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/ListWithInsetStyle.swift b/Sources/ViewTypes/ListWithInsetStyle.swift index 8ac801d5..3e7d8856 100644 --- a/Sources/ViewTypes/ListWithInsetStyle.swift +++ b/Sources/ViewTypes/ListWithInsetStyle.swift @@ -17,7 +17,7 @@ import SwiftUI /// .introspect(.list(style: .inset), on: .iOS(.v14, .v15)) { /// print(type(of: $0)) // UITableView /// } -/// .introspect(.list(style: .inset), on: .iOS(.v16, .v17)) { +/// .introspect(.list(style: .inset), on: .iOS(.v16, .v17, .v18)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -39,7 +39,7 @@ import SwiftUI /// Text("Item 3") /// } /// .listStyle(.inset) -/// .introspect(.list(style: .inset), on: .macOS(.v11, .v12, .v13, .v14)) { +/// .introspect(.list(style: .inset), on: .macOS(.v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSTableView /// } /// } @@ -57,7 +57,7 @@ import SwiftUI /// Text("Item 3") /// } /// .listStyle(.inset) -/// .introspect(.list(style: .inset), on: .visionOS(.v1)) { +/// .introspect(.list(style: .inset), on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -85,10 +85,12 @@ extension iOSViewVersion { extension iOSViewVersion { public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -98,6 +100,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ListWithSidebarStyle.swift b/Sources/ViewTypes/ListWithSidebarStyle.swift index 0b4522a1..a6f411c0 100644 --- a/Sources/ViewTypes/ListWithSidebarStyle.swift +++ b/Sources/ViewTypes/ListWithSidebarStyle.swift @@ -17,7 +17,7 @@ import SwiftUI /// .introspect(.list(style: .sidebar), on: .iOS(.v14, .v15)) { /// print(type(of: $0)) // UITableView /// } -/// .introspect(.list(style: .sidebar), on: .iOS(.v16, .v17)) { +/// .introspect(.list(style: .sidebar), on: .iOS(.v16, .v17, .v18)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -39,7 +39,7 @@ import SwiftUI /// Text("Item 3") /// } /// .listStyle(.sidebar) -/// .introspect(.list(style: .sidebar), on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.list(style: .sidebar), on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSTableView /// } /// } @@ -57,7 +57,7 @@ import SwiftUI /// Text("Item 3") /// } /// .listStyle(.sidebar) -/// .introspect(.list(style: .sidebar), on: .visionOS(.v1)) { +/// .introspect(.list(style: .sidebar), on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -85,10 +85,12 @@ extension iOSViewVersion { extension iOSViewVersion { public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -97,6 +99,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/Map.swift b/Sources/ViewTypes/Map.swift index 8d4f4f21..0268895b 100644 --- a/Sources/ViewTypes/Map.swift +++ b/Sources/ViewTypes/Map.swift @@ -11,7 +11,7 @@ import SwiftUI /// /// var body: some View { /// Map(coordinateRegion: $region) -/// .introspect(.map, on: .iOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.map, on: .iOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // MKMapView /// } /// } @@ -26,7 +26,7 @@ import SwiftUI /// /// var body: some View { /// Map(coordinateRegion: $region) -/// .introspect(.map, on: .tvOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.map, on: .tvOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // MKMapView /// } /// } @@ -41,7 +41,7 @@ import SwiftUI /// /// var body: some View { /// Map(coordinateRegion: $region) -/// .introspect(.map, on: .macOS(.v11, .v12, .v13, .v14)) { +/// .introspect(.map, on: .macOS(.v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // MKMapView /// } /// } @@ -56,7 +56,7 @@ import SwiftUI /// /// var body: some View { /// Map(coordinateRegion: $region) -/// .introspect(.map, on: .visionOS(.v1)) { +/// .introspect(.map, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // MKMapView /// } /// } @@ -87,6 +87,7 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension macOSViewVersion { @@ -96,10 +97,12 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/NavigationSplitView.swift b/Sources/ViewTypes/NavigationSplitView.swift index 41161867..d972c21b 100644 --- a/Sources/ViewTypes/NavigationSplitView.swift +++ b/Sources/ViewTypes/NavigationSplitView.swift @@ -13,7 +13,7 @@ import SwiftUI /// } detail: { /// Text("Detail") /// } -/// .introspect(.navigationSplitView, on: .iOS(.v16, .v17)) { +/// .introspect(.navigationSplitView, on: .iOS(.v16, .v17, .v18)) { /// print(type(of: $0)) // UISplitViewController /// } /// } @@ -30,7 +30,7 @@ import SwiftUI /// } detail: { /// Text("Detail") /// } -/// .introspect(.navigationSplitView, on: .tvOS(.v16, .v17)) { +/// .introspect(.navigationSplitView, on: .tvOS(.v16, .v17, .v18)) { /// print(type(of: $0)) // UINavigationController /// } /// } @@ -47,7 +47,7 @@ import SwiftUI /// } detail: { /// Text("Detail") /// } -/// .introspect(.navigationSplitView, on: .macOS(.v13, .v14)) { +/// .introspect(.navigationSplitView, on: .macOS(.v13, .v14, .v15)) { /// print(type(of: $0)) // NSSplitView /// } /// } @@ -64,7 +64,7 @@ import SwiftUI /// } detail: { /// Text("Detail") /// } -/// .introspect(.navigationSplitView, on: .visionOS(.v1)) { +/// .introspect(.navigationSplitView, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UISplitViewController /// } /// } @@ -87,6 +87,7 @@ extension iOSViewVersion { public static let v16 = Self(for: .v16, selector: selector) public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.splitViewController) @@ -103,6 +104,7 @@ extension tvOSViewVersion { public static let v16 = Self(for: .v16, selector: selector) public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.navigationController) @@ -111,6 +113,7 @@ extension tvOSViewVersion { extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.splitViewController) @@ -127,6 +130,7 @@ extension macOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/NavigationStack.swift b/Sources/ViewTypes/NavigationStack.swift index 2114a6d6..382ffd2c 100644 --- a/Sources/ViewTypes/NavigationStack.swift +++ b/Sources/ViewTypes/NavigationStack.swift @@ -11,7 +11,7 @@ import SwiftUI /// NavigationStack { /// Text("Root") /// } -/// .introspect(.navigationStack, on: .iOS(.v16, .v17)) { +/// .introspect(.navigationStack, on: .iOS(.v16, .v17, .v18)) { /// print(type(of: $0)) // UINavigationController /// } /// } @@ -26,7 +26,7 @@ import SwiftUI /// NavigationStack { /// Text("Root") /// } -/// .introspect(.navigationStack, on: .tvOS(.v16, .v17)) { +/// .introspect(.navigationStack, on: .tvOS(.v16, .v17, .v18)) { /// print(type(of: $0)) // UINavigationController /// } /// } @@ -45,7 +45,7 @@ import SwiftUI /// NavigationStack { /// Text("Root") /// } -/// .introspect(.navigationStack, on: .visionOS(.v1)) { +/// .introspect(.navigationStack, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UINavigationController /// } /// } @@ -68,6 +68,7 @@ extension iOSViewVersion { public static let v16 = Self(for: .v16, selector: selector) public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.navigationController) @@ -84,6 +85,7 @@ extension tvOSViewVersion { public static let v16 = Self(for: .v16, selector: selector) public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.navigationController) @@ -92,6 +94,7 @@ extension tvOSViewVersion { extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.navigationController) diff --git a/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift b/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift index 6a91f926..be7aaaf4 100644 --- a/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift +++ b/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift @@ -12,7 +12,7 @@ import SwiftUI /// Text("Root") /// } /// .navigationViewStyle(DoubleColumnNavigationViewStyle()) -/// .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.navigationView(style: .columns), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UISplitViewController /// } /// } @@ -28,7 +28,7 @@ import SwiftUI /// Text("Root") /// } /// .navigationViewStyle(DoubleColumnNavigationViewStyle()) -/// .introspect(.navigationView(style: .columns), on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.navigationView(style: .columns), on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UINavigationController /// } /// } @@ -44,7 +44,7 @@ import SwiftUI /// Text("Root") /// } /// .navigationViewStyle(DoubleColumnNavigationViewStyle()) -/// .introspect(.navigationView(style: .columns), on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.navigationView(style: .columns), on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSSplitView /// } /// } @@ -60,7 +60,7 @@ import SwiftUI /// Text("Root") /// } /// .navigationViewStyle(DoubleColumnNavigationViewStyle()) -/// .introspect(.navigationView(style: .columns), on: .visionOS(.v1)) { +/// .introspect(.navigationView(style: .columns), on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UISplitViewController /// } /// } @@ -83,6 +83,7 @@ extension iOSViewVersion { .default.withAncestorSelector(\.splitViewController) @@ -95,6 +96,7 @@ extension tvOSViewVersion { .default.withAncestorSelector(\.navigationController) @@ -103,6 +105,7 @@ extension tvOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.splitViewController) @@ -115,6 +118,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/NavigationViewWithStackStyle.swift b/Sources/ViewTypes/NavigationViewWithStackStyle.swift index 1a80605d..baf3dff4 100644 --- a/Sources/ViewTypes/NavigationViewWithStackStyle.swift +++ b/Sources/ViewTypes/NavigationViewWithStackStyle.swift @@ -12,7 +12,7 @@ import SwiftUI /// Text("Root") /// } /// .navigationViewStyle(.stack) -/// .introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.navigationView(style: .stack), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UINavigationController /// } /// } @@ -28,7 +28,7 @@ import SwiftUI /// Text("Root") /// } /// .navigationViewStyle(.stack) -/// .introspect(.navigationView(style: .stack), on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.navigationView(style: .stack), on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UINavigationController /// } /// } @@ -48,7 +48,7 @@ import SwiftUI /// Text("Root") /// } /// .navigationViewStyle(.stack) -/// .introspect(.navigationView(style: .stack), on: .visionOS(.v1)) { +/// .introspect(.navigationView(style: .stack), on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UINavigationController /// } /// } @@ -71,6 +71,7 @@ extension iOSViewVersion { .default.withAncestorSelector(\.navigationController) @@ -83,6 +84,7 @@ extension tvOSViewVersion { .default.withAncestorSelector(\.navigationController) @@ -91,6 +93,7 @@ extension tvOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.navigationController) diff --git a/Sources/ViewTypes/PageControl.swift b/Sources/ViewTypes/PageControl.swift index f6bfae3a..a16304e5 100644 --- a/Sources/ViewTypes/PageControl.swift +++ b/Sources/ViewTypes/PageControl.swift @@ -13,7 +13,7 @@ import SwiftUI /// Text("Page 2").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.blue) /// } /// .tabViewStyle(.page(indexDisplayMode: .always)) -/// .introspect(.pageControl, on: .iOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.pageControl, on: .iOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIPageControl /// } /// } @@ -30,7 +30,7 @@ import SwiftUI /// Text("Page 2").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.blue) /// } /// .tabViewStyle(.page(indexDisplayMode: .always)) -/// .introspect(.pageControl, on: .tvOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.pageControl, on: .tvOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIPageControl /// } /// } @@ -51,7 +51,7 @@ import SwiftUI /// Text("Page 2").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.blue) /// } /// .tabViewStyle(.page(indexDisplayMode: .always)) -/// .introspect(.pageControl, on: .visionOS(.v1)) { +/// .introspect(.pageControl, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UIPageControl /// } /// } @@ -71,6 +71,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @@ -80,10 +81,12 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/PickerWithMenuStyle.swift b/Sources/ViewTypes/PickerWithMenuStyle.swift index 530aeb9c..136d508f 100644 --- a/Sources/ViewTypes/PickerWithMenuStyle.swift +++ b/Sources/ViewTypes/PickerWithMenuStyle.swift @@ -24,7 +24,7 @@ import SwiftUI /// Text("3").tag("3") /// } /// .pickerStyle(.menu) -/// .introspect(.picker(style: .menu), on: .macOS(.v11, .v12, .v13, .v14)) { +/// .introspect(.picker(style: .menu), on: .macOS(.v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSPopUpButton /// } /// } @@ -53,6 +53,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/PickerWithSegmentedStyle.swift b/Sources/ViewTypes/PickerWithSegmentedStyle.swift index 42ba7487..45f0f75f 100644 --- a/Sources/ViewTypes/PickerWithSegmentedStyle.swift +++ b/Sources/ViewTypes/PickerWithSegmentedStyle.swift @@ -16,7 +16,7 @@ import SwiftUI /// Text("3").tag("3") /// } /// .pickerStyle(.segmented) -/// .introspect(.picker(style: .segmented), on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.picker(style: .segmented), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UISegmentedControl /// } /// } @@ -36,7 +36,7 @@ import SwiftUI /// Text("3").tag("3") /// } /// .pickerStyle(.segmented) -/// .introspect(.picker(style: .segmented), on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.picker(style: .segmented), on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UISegmentedControl /// } /// } @@ -56,7 +56,7 @@ import SwiftUI /// Text("3").tag("3") /// } /// .pickerStyle(.segmented) -/// .introspect(.picker(style: .segmented), on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.picker(style: .segmented), on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSSegmentedControl /// } /// } @@ -76,7 +76,7 @@ import SwiftUI /// Text("3").tag("3") /// } /// .pickerStyle(.segmented) -/// .introspect(.picker(style: .segmented), on: .visionOS(.v1)) { +/// .introspect(.picker(style: .segmented), on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UISegmentedControl /// } /// } @@ -99,6 +99,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @@ -107,10 +108,12 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -119,6 +122,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/PickerWithWheelStyle.swift b/Sources/ViewTypes/PickerWithWheelStyle.swift index 33f3041a..8da83ce0 100644 --- a/Sources/ViewTypes/PickerWithWheelStyle.swift +++ b/Sources/ViewTypes/PickerWithWheelStyle.swift @@ -16,7 +16,7 @@ import SwiftUI /// Text("3").tag("3") /// } /// .pickerStyle(.wheel) -/// .introspect(.picker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.picker(style: .wheel), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIPickerView /// } /// } @@ -44,7 +44,7 @@ import SwiftUI /// Text("3").tag("3") /// } /// .pickerStyle(.wheel) -/// .introspect(.picker(style: .wheel), on: .visionOS(.v1)) { +/// .introspect(.picker(style: .wheel), on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UIPickerView /// } /// } @@ -68,10 +68,12 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/Popover.swift b/Sources/ViewTypes/Popover.swift index fff2e66f..39f30bda 100644 --- a/Sources/ViewTypes/Popover.swift +++ b/Sources/ViewTypes/Popover.swift @@ -13,7 +13,7 @@ import SwiftUI /// Button("Present", action: { isPresented = true }) /// .popover(isPresented: $isPresented) { /// Button("Dismiss", action: { isPresented = false }) -/// .introspect(.popover, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.popover, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIPopoverPresentationController /// } /// } @@ -39,7 +39,7 @@ import SwiftUI /// Button("Present", action: { isPresented = true }) /// .popover(isPresented: $isPresented) { /// Button("Dismiss", action: { isPresented = false }) -/// .introspect(.popover, on: .visionOS(.v1)) { +/// .introspect(.popover, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UIPopoverPresentationController /// } /// } @@ -62,6 +62,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15, selector: selector) public static let v16 = Self(for: .v16, selector: selector) public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.popoverPresentationController) @@ -70,6 +71,7 @@ extension iOSViewVersion { extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.popoverPresentationController) diff --git a/Sources/ViewTypes/ProgressViewWithCircularStyle.swift b/Sources/ViewTypes/ProgressViewWithCircularStyle.swift index 549ed807..bdf2521d 100644 --- a/Sources/ViewTypes/ProgressViewWithCircularStyle.swift +++ b/Sources/ViewTypes/ProgressViewWithCircularStyle.swift @@ -10,7 +10,7 @@ import SwiftUI /// var body: some View { /// ProgressView(value: 0.5) /// .progressViewStyle(.circular) -/// .introspect(.progressView(style: .circular), on: .iOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.progressView(style: .circular), on: .iOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIActivityIndicatorView /// } /// } @@ -24,7 +24,7 @@ import SwiftUI /// var body: some View { /// ProgressView(value: 0.5) /// .progressViewStyle(.circular) -/// .introspect(.progressView(style: .circular), on: .tvOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.progressView(style: .circular), on: .tvOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIActivityIndicatorView /// } /// } @@ -38,7 +38,7 @@ import SwiftUI /// var body: some View { /// ProgressView(value: 0.5) /// .progressViewStyle(.circular) -/// .introspect(.progressView(style: .circular), on: .macOS(.v11, .v12, .v13, .v14)) { +/// .introspect(.progressView(style: .circular), on: .macOS(.v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSProgressIndicator /// } /// } @@ -52,7 +52,7 @@ import SwiftUI /// var body: some View { /// ProgressView(value: 0.5) /// .progressViewStyle(.circular) -/// .introspect(.progressView(style: .circular), on: .visionOS(.v1)) { +/// .introspect(.progressView(style: .circular), on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UIActivityIndicatorView /// } /// } @@ -76,6 +76,7 @@ extension iOSViewVersion { @@ -85,10 +86,12 @@ extension tvOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -98,6 +101,7 @@ extension macOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @@ -85,10 +86,12 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -98,6 +101,7 @@ extension macOSViewVersion public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ScrollView.swift b/Sources/ViewTypes/ScrollView.swift index fdddae0b..c449c7f4 100644 --- a/Sources/ViewTypes/ScrollView.swift +++ b/Sources/ViewTypes/ScrollView.swift @@ -11,7 +11,7 @@ import SwiftUI /// ScrollView { /// Text("Item") /// } -/// .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.scrollView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIScrollView /// } /// } @@ -26,7 +26,7 @@ import SwiftUI /// ScrollView { /// Text("Item") /// } -/// .introspect(.scrollView, on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.scrollView, on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIScrollView /// } /// } @@ -41,7 +41,7 @@ import SwiftUI /// ScrollView { /// Text("Item") /// } -/// .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.scrollView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSScrollView /// } /// } @@ -56,7 +56,7 @@ import SwiftUI /// ScrollView { /// Text("Item") /// } -/// .introspect(.scrollView, on: .visionOS(.v1)) { +/// .introspect(.scrollView, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UIScrollView /// } /// } @@ -75,6 +75,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @@ -83,10 +84,12 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -95,6 +98,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/SearchField.swift b/Sources/ViewTypes/SearchField.swift index b1ec7592..ce7129ce 100644 --- a/Sources/ViewTypes/SearchField.swift +++ b/Sources/ViewTypes/SearchField.swift @@ -15,7 +15,7 @@ import SwiftUI /// .searchable(text: $searchTerm) /// } /// .navigationViewStyle(.stack) -/// .introspect(.searchField, on: .iOS(.v15, .v16, .v17)) { +/// .introspect(.searchField, on: .iOS(.v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UISearchBar /// } /// } @@ -34,7 +34,7 @@ import SwiftUI /// .searchable(text: $searchTerm) /// } /// .navigationViewStyle(.stack) -/// .introspect(.searchField, on: .tvOS(.v15, .v16, .v17)) { +/// .introspect(.searchField, on: .tvOS(.v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UISearchBar /// } /// } @@ -57,7 +57,7 @@ import SwiftUI /// .searchable(text: $searchTerm) /// } /// .navigationViewStyle(.stack) -/// .introspect(.searchField, on: .visionOS(.v1)) { +/// .introspect(.searchField, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UISearchBar /// } /// } @@ -78,6 +78,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15, selector: selector) public static let v16 = Self(for: .v16, selector: selector) public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { .from(UINavigationController.self) { @@ -94,6 +95,7 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15, selector: selector) public static let v16 = Self(for: .v16, selector: selector) public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { .from(UINavigationController.self) { @@ -104,6 +106,7 @@ extension tvOSViewVersion { extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) private static var selector: IntrospectionSelector { .from(UINavigationController.self) { diff --git a/Sources/ViewTypes/SecureField.swift b/Sources/ViewTypes/SecureField.swift index c8c977f2..f8d330c4 100644 --- a/Sources/ViewTypes/SecureField.swift +++ b/Sources/ViewTypes/SecureField.swift @@ -11,7 +11,7 @@ import SwiftUI /// /// var body: some View { /// SecureField("Secure Field", text: $text) -/// .introspect(.secureField, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.secureField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UISecureField /// } /// } @@ -26,7 +26,7 @@ import SwiftUI /// /// var body: some View { /// SecureField("Secure Field", text: $text) -/// .introspect(.secureField, on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.secureField, on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UISecureField /// } /// } @@ -41,7 +41,7 @@ import SwiftUI /// /// var body: some View { /// SecureField("Secure Field", text: $text) -/// .introspect(.secureField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.secureField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSSecureField /// } /// } @@ -56,7 +56,7 @@ import SwiftUI /// /// var body: some View { /// SecureField("Secure Field", text: $text) -/// .introspect(.secureField, on: .visionOS(.v1)) { +/// .introspect(.secureField, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UISecureField /// } /// } @@ -75,6 +75,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @@ -83,10 +84,12 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -95,6 +98,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/Sheet.swift b/Sources/ViewTypes/Sheet.swift index 8bfb5f5f..b3e6a859 100644 --- a/Sources/ViewTypes/Sheet.swift +++ b/Sources/ViewTypes/Sheet.swift @@ -13,7 +13,7 @@ import SwiftUI /// Button("Present", action: { isPresented = true }) /// .sheet(isPresented: $isPresented) { /// Button("Dismiss", action: { isPresented = false }) -/// .introspect(.sheet, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.sheet, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIPresentationController /// } /// } @@ -31,7 +31,7 @@ import SwiftUI /// Button("Present", action: { isPresented = true }) /// .sheet(isPresented: $isPresented) { /// Button("Dismiss", action: { isPresented = false }) -/// .introspect(.sheet, on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.sheet, on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIPresentationController /// } /// } @@ -53,7 +53,7 @@ import SwiftUI /// Button("Present", action: { isPresented = true }) /// .sheet(isPresented: $isPresented) { /// Button("Dismiss", action: { isPresented = false }) -/// .introspect(.sheet, on: .visionOS(.v1)) { +/// .introspect(.sheet, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UISheetPresentationController /// } /// } @@ -76,6 +76,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15, selector: selector) public static let v16 = Self(for: .v16, selector: selector) public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.presentationController) @@ -91,6 +92,8 @@ extension iOSViewVersion { public static let v16 = Self(for: .v16, selector: selector) @_disfavoredOverload public static let v17 = Self(for: .v17, selector: selector) + @_disfavoredOverload + public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.sheetPresentationController) @@ -100,6 +103,7 @@ extension iOSViewVersion { @available(iOS 15, *) extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.sheetPresentationController) @@ -113,6 +117,7 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15, selector: selector) public static let v16 = Self(for: .v16, selector: selector) public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: \.presentationController) diff --git a/Sources/ViewTypes/Slider.swift b/Sources/ViewTypes/Slider.swift index 9e1def5f..34e283b8 100644 --- a/Sources/ViewTypes/Slider.swift +++ b/Sources/ViewTypes/Slider.swift @@ -11,7 +11,7 @@ import SwiftUI /// /// var body: some View { /// Slider(value: $selection, in: 0...1) -/// .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.slider, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UISlider /// } /// } @@ -30,7 +30,7 @@ import SwiftUI /// /// var body: some View { /// Slider(value: $selection, in: 0...1) -/// .introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.slider, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSSlider /// } /// } @@ -54,6 +54,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -62,6 +63,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/Stepper.swift b/Sources/ViewTypes/Stepper.swift index 8eaf5d12..40e6dd1b 100644 --- a/Sources/ViewTypes/Stepper.swift +++ b/Sources/ViewTypes/Stepper.swift @@ -11,7 +11,7 @@ import SwiftUI /// /// var body: some View { /// Stepper("Select a number", value: $selection, in: 0...10) -/// .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.stepper, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIStepper /// } /// } @@ -30,7 +30,7 @@ import SwiftUI /// /// var body: some View { /// Stepper("Select a number", value: $selection, in: 0...10) -/// .introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.stepper, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSStepper /// } /// } @@ -54,6 +54,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -62,6 +63,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/TabView.swift b/Sources/ViewTypes/TabView.swift index cbd02851..850482f7 100644 --- a/Sources/ViewTypes/TabView.swift +++ b/Sources/ViewTypes/TabView.swift @@ -12,7 +12,7 @@ import SwiftUI /// Text("Tab 1").tabItem { Text("Tab 1") } /// Text("Tab 2").tabItem { Text("Tab 2") } /// } -/// .introspect(.tabView, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.tabView, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UITabBarController /// } /// } @@ -28,7 +28,7 @@ import SwiftUI /// Text("Tab 1").tabItem { Text("Tab 1") } /// Text("Tab 2").tabItem { Text("Tab 2") } /// } -/// .introspect(.tabView, on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.tabView, on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UITabBarController /// } /// } @@ -44,7 +44,7 @@ import SwiftUI /// Text("Tab 1").tabItem { Text("Tab 1") } /// Text("Tab 2").tabItem { Text("Tab 2") } /// } -/// .introspect(.tabView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.tabView, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSTabView /// } /// } @@ -68,6 +68,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15, selector: selector) public static let v16 = Self(for: .v16, selector: selector) public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.tabBarController) @@ -80,6 +81,7 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15, selector: selector) public static let v16 = Self(for: .v16, selector: selector) public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { .default.withAncestorSelector(\.tabBarController) @@ -92,6 +94,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/TabViewWithPageStyle.swift b/Sources/ViewTypes/TabViewWithPageStyle.swift index 63edc896..8d567415 100644 --- a/Sources/ViewTypes/TabViewWithPageStyle.swift +++ b/Sources/ViewTypes/TabViewWithPageStyle.swift @@ -13,7 +13,7 @@ import SwiftUI /// Text("Page 2").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.blue) /// } /// .tabViewStyle(.page(indexDisplayMode: .always)) -/// .introspect(.tabView(style: .page), on: .iOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.tabView(style: .page), on: .iOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -30,7 +30,7 @@ import SwiftUI /// Text("Page 2").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.blue) /// } /// .tabViewStyle(.page(indexDisplayMode: .always)) -/// .introspect(.tabView(style: .page), on: .tvOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.tabView(style: .page), on: .tvOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -51,7 +51,7 @@ import SwiftUI /// Text("Page 2").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.blue) /// } /// .tabViewStyle(.page(indexDisplayMode: .always)) -/// .introspect(.tabView(style: .page), on: .visionOS(.v1)) { +/// .introspect(.tabView(style: .page), on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -76,6 +76,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @@ -85,10 +86,12 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/Table.swift b/Sources/ViewTypes/Table.swift index 6bfcd3f9..4baee5ff 100644 --- a/Sources/ViewTypes/Table.swift +++ b/Sources/ViewTypes/Table.swift @@ -28,7 +28,7 @@ import SwiftUI /// TableRow(Purchase(price: 50)) /// TableRow(Purchase(price: 75)) /// } -/// .introspect(.table, on: .iOS(.v16, .v17)) { +/// .introspect(.table, on: .iOS(.v16, .v17, .v18)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -64,7 +64,7 @@ import SwiftUI /// TableRow(Purchase(price: 50)) /// TableRow(Purchase(price: 75)) /// } -/// .introspect(.table, on: .macOS(.v12, .v13, .v14)) { +/// .introspect(.table, on: .macOS(.v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSTableView /// } /// } @@ -96,7 +96,7 @@ import SwiftUI /// TableRow(Purchase(price: 50)) /// TableRow(Purchase(price: 75)) /// } -/// .introspect(.table, on: .visionOS(.v1)) { +/// .introspect(.table, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UICollectionView /// } /// } @@ -119,10 +119,12 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -133,6 +135,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/TextEditor.swift b/Sources/ViewTypes/TextEditor.swift index 09b3a978..d97ffcc8 100644 --- a/Sources/ViewTypes/TextEditor.swift +++ b/Sources/ViewTypes/TextEditor.swift @@ -11,7 +11,7 @@ import SwiftUI /// /// var body: some View { /// TextEditor(text: $text) -/// .introspect(.textEditor, on: .iOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.textEditor, on: .iOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UITextView /// } /// } @@ -30,7 +30,7 @@ import SwiftUI /// /// var body: some View { /// TextEditor(text: $text) -/// .introspect(.textEditor, on: .macOS(.v11, .v12, .v13, .v14)) { +/// .introspect(.textEditor, on: .macOS(.v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSTextView /// } /// } @@ -45,7 +45,7 @@ import SwiftUI /// /// var body: some View { /// TextEditor(text: $text) -/// .introspect(.textEditor, on: .visionOS(.v1)) { +/// .introspect(.textEditor, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UITextView /// } /// } @@ -66,10 +66,12 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -79,6 +81,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/TextField.swift b/Sources/ViewTypes/TextField.swift index 9c95a095..7abc2ac6 100644 --- a/Sources/ViewTypes/TextField.swift +++ b/Sources/ViewTypes/TextField.swift @@ -11,7 +11,7 @@ import SwiftUI /// /// var body: some View { /// TextField("Text Field", text: $text) -/// .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.textField, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UITextField /// } /// } @@ -26,7 +26,7 @@ import SwiftUI /// /// var body: some View { /// TextField("Text Field", text: $text) -/// .introspect(.textField, on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.textField, on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UITextField /// } /// } @@ -41,7 +41,7 @@ import SwiftUI /// /// var body: some View { /// TextField("Text Field", text: $text) -/// .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.textField, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSTextField /// } /// } @@ -56,7 +56,7 @@ import SwiftUI /// /// var body: some View { /// TextField("Text Field", text: $text) -/// .introspect(.textField, on: .visionOS(.v1)) { +/// .introspect(.textField, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UITextField /// } /// } @@ -75,6 +75,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @@ -83,10 +84,12 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -95,6 +98,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/TextFieldWithVerticalAxis.swift b/Sources/ViewTypes/TextFieldWithVerticalAxis.swift index 275bc18f..e044182c 100644 --- a/Sources/ViewTypes/TextFieldWithVerticalAxis.swift +++ b/Sources/ViewTypes/TextFieldWithVerticalAxis.swift @@ -11,7 +11,7 @@ import SwiftUI /// /// var body: some View { /// TextField("Text Field", text: $text, axis: .vertical) -/// .introspect(.textField(axis: .vertical), on: .iOS(.v16, .v17)) { +/// .introspect(.textField(axis: .vertical), on: .iOS(.v16, .v17, .v18)) { /// print(type(of: $0)) // UITextView /// } /// } @@ -26,7 +26,7 @@ import SwiftUI /// /// var body: some View { /// TextField("Text Field", text: $text, axis: .vertical) -/// .introspect(.textField(axis: .vertical), on: .tvOS(.v16, .v17)) { +/// .introspect(.textField(axis: .vertical), on: .tvOS(.v16, .v17, .v18)) { /// print(type(of: $0)) // UITextField /// } /// } @@ -41,7 +41,7 @@ import SwiftUI /// /// var body: some View { /// TextField("Text Field", text: $text, axis: .vertical) -/// .introspect(.textField(axis: .vertical), on: .macOS(.v13, .v14)) { +/// .introspect(.textField(axis: .vertical), on: .macOS(.v13, .v14, .v15)) { /// print(type(of: $0)) // NSTextField /// } /// } @@ -56,7 +56,7 @@ import SwiftUI /// /// var body: some View { /// TextField("Text Field", text: $text, axis: .vertical) -/// .introspect(.textField(axis: .vertical), on: .visionOS(.v1)) { +/// .introspect(.textField(axis: .vertical), on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UITextView /// } /// } @@ -85,6 +85,7 @@ extension iOSViewVersion { public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @@ -96,11 +97,12 @@ extension tvOSViewVersion { public static let v15 = Self.unavailable() public static let v16 = Self(for: .v16) - public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -113,6 +115,7 @@ extension macOSViewVersion { public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/Toggle.swift b/Sources/ViewTypes/Toggle.swift index bad518bb..c8924a2d 100644 --- a/Sources/ViewTypes/Toggle.swift +++ b/Sources/ViewTypes/Toggle.swift @@ -11,7 +11,7 @@ import SwiftUI /// /// var body: some View { /// Toggle("Toggle", isOn: $isOn) -/// .introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.toggle, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UISwitch /// } /// } @@ -30,7 +30,7 @@ import SwiftUI /// /// var body: some View { /// Toggle("Toggle", isOn: $isOn) -/// .introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.toggle, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSButton /// } /// } @@ -54,6 +54,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -62,6 +63,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ToggleWithButtonStyle.swift b/Sources/ViewTypes/ToggleWithButtonStyle.swift index 36dcaab9..06f924d6 100644 --- a/Sources/ViewTypes/ToggleWithButtonStyle.swift +++ b/Sources/ViewTypes/ToggleWithButtonStyle.swift @@ -20,7 +20,7 @@ import SwiftUI /// var body: some View { /// Toggle("Toggle", isOn: $isOn) /// .toggleStyle(.button) -/// .introspect(.toggle(style: .button), on: .macOS(.v12, .v13, .v14)) { +/// .introspect(.toggle(style: .button), on: .macOS(.v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSButton /// } /// } @@ -50,6 +50,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ToggleWithCheckboxStyle.swift b/Sources/ViewTypes/ToggleWithCheckboxStyle.swift index 04df5e45..bb077a19 100644 --- a/Sources/ViewTypes/ToggleWithCheckboxStyle.swift +++ b/Sources/ViewTypes/ToggleWithCheckboxStyle.swift @@ -20,7 +20,7 @@ import SwiftUI /// var body: some View { /// Toggle("Checkbox", isOn: $isOn) /// .toggleStyle(.checkbox) -/// .introspect(.toggle(style: .checkbox), on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.toggle(style: .checkbox), on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSButton /// } /// } @@ -48,6 +48,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ToggleWithSwitchStyle.swift b/Sources/ViewTypes/ToggleWithSwitchStyle.swift index f6bf589d..9b737212 100644 --- a/Sources/ViewTypes/ToggleWithSwitchStyle.swift +++ b/Sources/ViewTypes/ToggleWithSwitchStyle.swift @@ -12,7 +12,7 @@ import SwiftUI /// var body: some View { /// Toggle("Switch", isOn: $isOn) /// .toggleStyle(.switch) -/// .introspect(.toggle(style: .switch), on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.toggle(style: .switch), on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UISwitch /// } /// } @@ -32,7 +32,7 @@ import SwiftUI /// var body: some View { /// Toggle("Switch", isOn: $isOn) /// .toggleStyle(.switch) -/// .introspect(.toggle(style: .switch), on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.toggle(style: .switch), on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSSwitch /// } /// } @@ -60,6 +60,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -68,6 +69,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/VideoPlayer.swift b/Sources/ViewTypes/VideoPlayer.swift index 28b7a513..be50449c 100644 --- a/Sources/ViewTypes/VideoPlayer.swift +++ b/Sources/ViewTypes/VideoPlayer.swift @@ -9,7 +9,7 @@ import SwiftUI /// struct ContentView: View { /// var body: some View { /// VideoPlayer(player: AVPlayer(url: URL(string: "https://bit.ly/swswift")!)) -/// .introspect(.videoPlayer, on: .iOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.videoPlayer, on: .iOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // AVPlayerViewController /// } /// } @@ -22,7 +22,7 @@ import SwiftUI /// struct ContentView: View { /// var body: some View { /// VideoPlayer(player: AVPlayer(url: URL(string: "https://bit.ly/swswift")!)) -/// .introspect(.videoPlayer, on: .tvOS(.v14, .v15, .v16, .v17)) { +/// .introspect(.videoPlayer, on: .tvOS(.v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // AVPlayerViewController /// } /// } @@ -35,7 +35,7 @@ import SwiftUI /// struct ContentView: View { /// var body: some View { /// VideoPlayer(player: AVPlayer(url: URL(string: "https://bit.ly/swswift")!)) -/// .introspect(.videoPlayer, on: .macOS(.v11, .v12, .v13, .v14)) { +/// .introspect(.videoPlayer, on: .macOS(.v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // AVPlayerView /// } /// } @@ -48,7 +48,7 @@ import SwiftUI /// struct ContentView: View { /// var body: some View { /// VideoPlayer(player: AVPlayer(url: URL(string: "https://bit.ly/swswift")!)) -/// .introspect(.videoPlayer, on: .visionOS(.v1)) { +/// .introspect(.videoPlayer, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // AVPlayerViewController /// } /// } @@ -71,6 +71,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @@ -80,10 +81,12 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -93,6 +96,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/View.swift b/Sources/ViewTypes/View.swift index 0960c053..02c99a66 100644 --- a/Sources/ViewTypes/View.swift +++ b/Sources/ViewTypes/View.swift @@ -12,7 +12,7 @@ import SwiftUI /// Image(systemName: "scribble") /// Text("Some text") /// } -/// .introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.view, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // some subclass of UIView /// } /// } @@ -28,7 +28,7 @@ import SwiftUI /// Image(systemName: "scribble") /// Text("Some text") /// } -/// .introspect(.view, on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.view, on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // some subclass of UIView /// } /// } @@ -44,7 +44,7 @@ import SwiftUI /// Image(systemName: "scribble") /// Text("Some text") /// } -/// .introspect(.view, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.view, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // some subclass of NSView /// } /// } @@ -60,7 +60,7 @@ import SwiftUI /// Image(systemName: "scribble") /// Text("Some text") /// } -/// .introspect(.view, on: .visionOS(.v1)) { +/// .introspect(.view, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // some subclass of UIView /// } /// } @@ -79,6 +79,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @@ -87,10 +88,12 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) extension macOSViewVersion { @@ -99,6 +102,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12) public static let v13 = Self(for: .v13) public static let v14 = Self(for: .v14) + public static let v15 = Self(for: .v15) } #endif #endif diff --git a/Sources/ViewTypes/ViewController.swift b/Sources/ViewTypes/ViewController.swift index c2e48840..86c3941d 100644 --- a/Sources/ViewTypes/ViewController.swift +++ b/Sources/ViewTypes/ViewController.swift @@ -11,12 +11,12 @@ import SwiftUI /// var body: some View { /// NavigationView { /// Text("Root").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.red) -/// .introspect(.viewController, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.viewController, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // some subclass of UIHostingController /// } /// } /// .navigationViewStyle(.stack) -/// .introspect(.viewController, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.viewController, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UINavigationController /// } /// } @@ -30,12 +30,12 @@ import SwiftUI /// var body: some View { /// NavigationView { /// Text("Root").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.red) -/// .introspect(.viewController, on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.viewController, on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // some subclass of UIHostingController /// } /// } /// .navigationViewStyle(.stack) -/// .introspect(.viewController, on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.viewController, on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UINavigationController /// } /// } @@ -53,12 +53,12 @@ import SwiftUI /// var body: some View { /// NavigationView { /// Text("Root").frame(maxWidth: .infinity, maxHeight: .infinity).background(Color.red) -/// .introspect(.viewController, on: .visionOS(.v1)) { +/// .introspect(.viewController, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // some subclass of UIHostingController /// } /// } /// .navigationViewStyle(.stack) -/// .introspect(.viewController, on: .visionOS(.v1)) { +/// .introspect(.viewController, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UINavigationController /// } /// } @@ -79,6 +79,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension tvOSViewVersion { @@ -87,10 +88,12 @@ extension tvOSViewVersion { public static let v15 = Self(for: .v15) public static let v16 = Self(for: .v16) public static let v17 = Self(for: .v17) + public static let v18 = Self(for: .v18) } extension visionOSViewVersion { public static let v1 = Self(for: .v1) + public static let v2 = Self(for: .v2) } #endif #endif diff --git a/Sources/ViewTypes/Window.swift b/Sources/ViewTypes/Window.swift index 97aaf895..eceab6a7 100644 --- a/Sources/ViewTypes/Window.swift +++ b/Sources/ViewTypes/Window.swift @@ -9,7 +9,7 @@ import SwiftUI /// struct ContentView: View { /// var body: some View { /// Text("Content") -/// .introspect(.window, on: .iOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.window, on: .iOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIWindow /// } /// } @@ -22,7 +22,7 @@ import SwiftUI /// struct ContentView: View { /// var body: some View { /// Text("Content") -/// .introspect(.window, on: .tvOS(.v13, .v14, .v15, .v16, .v17)) { +/// .introspect(.window, on: .tvOS(.v13, .v14, .v15, .v16, .v17, .v18)) { /// print(type(of: $0)) // UIWindow /// } /// } @@ -35,7 +35,7 @@ import SwiftUI /// struct ContentView: View { /// var body: some View { /// Text("Content") -/// .introspect(.window, on: .macOS(.v10_15, .v11, .v12, .v13, .v14)) { +/// .introspect(.window, on: .macOS(.v10_15, .v11, .v12, .v13, .v14, .v15)) { /// print(type(of: $0)) // NSWindow /// } /// } @@ -48,7 +48,7 @@ import SwiftUI /// struct ContentView: View { /// var body: some View { /// Text("Content") -/// .introspect(.window, on: .visionOS(.v1)) { +/// .introspect(.window, on: .visionOS(.v1, .v2)) { /// print(type(of: $0)) // UIWindow /// } /// } @@ -67,6 +67,7 @@ extension iOSViewVersion { public static let v15 = Self(for: .v15, selector: selector) public static let v16 = Self(for: .v16, selector: selector) public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { .from(UIView.self, selector: \.window) @@ -78,7 +79,7 @@ extension tvOSViewVersion { public static let v14 = Self(for: .v14, selector: selector) public static let v15 = Self(for: .v15, selector: selector) public static let v16 = Self(for: .v16, selector: selector) - public static let v17 = Self(for: .v17, selector: selector) + public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { .from(UIView.self, selector: \.window) @@ -87,6 +88,7 @@ extension tvOSViewVersion { extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) + public static let v2 = Self(for: .v2, selector: selector) private static var selector: IntrospectionSelector { .from(UIView.self, selector: \.window) @@ -99,6 +101,7 @@ extension macOSViewVersion { public static let v12 = Self(for: .v12, selector: selector) public static let v13 = Self(for: .v13, selector: selector) public static let v14 = Self(for: .v14, selector: selector) + public static let v15 = Self(for: .v15, selector: selector) private static var selector: IntrospectionSelector { .from(NSView.self, selector: \.window) From 0904ba3db9c106f94b875e592e1b2970359810da Mon Sep 17 00:00:00 2001 From: liamcharger Date: Wed, 12 Jun 2024 08:29:56 -0400 Subject: [PATCH 7/9] Fix mistakes --- Sources/ViewTypes/TextFieldWithVerticalAxis.swift | 1 + Sources/ViewTypes/Window.swift | 1 + 2 files changed, 2 insertions(+) diff --git a/Sources/ViewTypes/TextFieldWithVerticalAxis.swift b/Sources/ViewTypes/TextFieldWithVerticalAxis.swift index e044182c..a8501fb2 100644 --- a/Sources/ViewTypes/TextFieldWithVerticalAxis.swift +++ b/Sources/ViewTypes/TextFieldWithVerticalAxis.swift @@ -97,6 +97,7 @@ extension tvOSViewVersion { public static let v15 = Self.unavailable() public static let v16 = Self(for: .v16) + public static let v17 = Self(for: .v17) public static let v18 = Self(for: .v18) } diff --git a/Sources/ViewTypes/Window.swift b/Sources/ViewTypes/Window.swift index eceab6a7..e1203c81 100644 --- a/Sources/ViewTypes/Window.swift +++ b/Sources/ViewTypes/Window.swift @@ -79,6 +79,7 @@ extension tvOSViewVersion { public static let v14 = Self(for: .v14, selector: selector) public static let v15 = Self(for: .v15, selector: selector) public static let v16 = Self(for: .v16, selector: selector) + public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) private static var selector: IntrospectionSelector { From e5d36b00e6e437b552aa76ed6d1eca71d6fd8f8b Mon Sep 17 00:00:00 2001 From: liamcharger <105521623+liamcharger@users.noreply.github.com> Date: Wed, 12 Jun 2024 10:21:00 -0400 Subject: [PATCH 8/9] Fix mistake Co-authored-by: KKirsten --- Sources/ViewTypes/DatePickerWithCompactStyle.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/ViewTypes/DatePickerWithCompactStyle.swift b/Sources/ViewTypes/DatePickerWithCompactStyle.swift index c4d92e97..c9023564 100644 --- a/Sources/ViewTypes/DatePickerWithCompactStyle.swift +++ b/Sources/ViewTypes/DatePickerWithCompactStyle.swift @@ -78,7 +78,7 @@ extension iOSViewVersion { extension visionOSViewVersion { public static let v1 = Self(for: .v1) - public static let v1 = Self(for: .v2) + public static let v2 = Self(for: .v2) } #elseif canImport(AppKit) && !targetEnvironment(macCatalyst) extension macOSViewVersion { From b4f0bf94f0d9d532d31511d31eceae5588b91034 Mon Sep 17 00:00:00 2001 From: liamcharger <105521623+liamcharger@users.noreply.github.com> Date: Thu, 13 Jun 2024 21:55:00 -0400 Subject: [PATCH 9/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9fbf0d44..b9bbb26e 100644 --- a/README.md +++ b/README.md @@ -269,7 +269,7 @@ struct ContentView: View { } ``` -Bear in mind this should be used cautiously, and with full knowledge that any future OS version might break the expected introspection types unless explicitly available. For instance, if in the example above hypothetically iOS 18 stops using UIScrollView under the hood, the customization closure will never be called on said platform. +Bear in mind this should be used cautiously, and with full knowledge that any future OS version might break the expected introspection types unless explicitly available. For instance, if in the example above hypothetically iOS 19 stops using UIScrollView under the hood, the customization closure will never be called on said platform. ### Keep instances outside the customize closure