diff --git a/Sources/ViewTypes/Button.swift b/Sources/ViewTypes/Button.swift index 5d0078f7..aa8a591a 100644 --- a/Sources/ViewTypes/Button.swift +++ b/Sources/ViewTypes/Button.swift @@ -31,7 +31,7 @@ public struct ButtonType: IntrospectableViewType {} #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ButtonType { - @MainActor public static var button: Self { .init() } + public static var button: Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) diff --git a/Sources/ViewTypes/ColorPicker.swift b/Sources/ViewTypes/ColorPicker.swift index b888c2ab..3aa7f8dd 100644 --- a/Sources/ViewTypes/ColorPicker.swift +++ b/Sources/ViewTypes/ColorPicker.swift @@ -55,7 +55,7 @@ public struct ColorPickerType: IntrospectableViewType {} #if !os(tvOS) extension IntrospectableViewType where Self == ColorPickerType { - @MainActor public static var colorPicker: Self { .init() } + public static var colorPicker: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/DatePicker.swift b/Sources/ViewTypes/DatePicker.swift index bed3b4ca..7ee07098 100644 --- a/Sources/ViewTypes/DatePicker.swift +++ b/Sources/ViewTypes/DatePicker.swift @@ -53,7 +53,7 @@ public struct DatePickerType: IntrospectableViewType {} #if !os(tvOS) extension IntrospectableViewType where Self == DatePickerType { - @MainActor public static var datePicker: Self { .init() } + public static var datePicker: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/DatePickerWithCompactStyle.swift b/Sources/ViewTypes/DatePickerWithCompactStyle.swift index 3daf05f0..4472ac47 100644 --- a/Sources/ViewTypes/DatePickerWithCompactStyle.swift +++ b/Sources/ViewTypes/DatePickerWithCompactStyle.swift @@ -62,7 +62,7 @@ public struct DatePickerWithCompactStyleType: IntrospectableViewType { #if !os(tvOS) extension IntrospectableViewType where Self == DatePickerWithCompactStyleType { - @MainActor public static func datePicker(style: Self.Style) -> Self { .init() } + public static func datePicker(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/DatePickerWithFieldStyle.swift b/Sources/ViewTypes/DatePickerWithFieldStyle.swift index ef376478..052b6137 100644 --- a/Sources/ViewTypes/DatePickerWithFieldStyle.swift +++ b/Sources/ViewTypes/DatePickerWithFieldStyle.swift @@ -38,7 +38,7 @@ public struct DatePickerWithFieldStyleType: IntrospectableViewType { #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == DatePickerWithFieldStyleType { - @MainActor public static func datePicker(style: Self.Style) -> Self { .init() } + public static func datePicker(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) diff --git a/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift b/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift index 7c21ce4c..fe752533 100644 --- a/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift +++ b/Sources/ViewTypes/DatePickerWithGraphicalStyle.swift @@ -62,7 +62,7 @@ public struct DatePickerWithGraphicalStyleType: IntrospectableViewType { #if !os(tvOS) extension IntrospectableViewType where Self == DatePickerWithGraphicalStyleType { - @MainActor public static func datePicker(style: Self.Style) -> Self { .init() } + public static func datePicker(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift b/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift index 13dc9aa6..abc4e2fe 100644 --- a/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift +++ b/Sources/ViewTypes/DatePickerWithStepperFieldStyle.swift @@ -38,7 +38,7 @@ public struct DatePickerWithStepperFieldStyleType: IntrospectableViewType { #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == DatePickerWithStepperFieldStyleType { - @MainActor public static func datePicker(style: Self.Style) -> Self { .init() } + public static func datePicker(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) diff --git a/Sources/ViewTypes/DatePickerWithWheelStyle.swift b/Sources/ViewTypes/DatePickerWithWheelStyle.swift index ebc5b983..4b20e03a 100644 --- a/Sources/ViewTypes/DatePickerWithWheelStyle.swift +++ b/Sources/ViewTypes/DatePickerWithWheelStyle.swift @@ -50,7 +50,7 @@ public struct DatePickerWithWheelStyleType: IntrospectableViewType { #if !os(tvOS) && !os(macOS) extension IntrospectableViewType where Self == DatePickerWithWheelStyleType { - @MainActor public static func datePicker(style: Self.Style) -> Self { .init() } + public static func datePicker(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/Form.swift b/Sources/ViewTypes/Form.swift index 12b4a276..92f3ffd7 100644 --- a/Sources/ViewTypes/Form.swift +++ b/Sources/ViewTypes/Form.swift @@ -64,7 +64,7 @@ public struct FormType: IntrospectableViewType {} #if !os(macOS) extension IntrospectableViewType where Self == FormType { - @MainActor public static var form: Self { .init() } + public static var form: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/FormWithGroupedStyle.swift b/Sources/ViewTypes/FormWithGroupedStyle.swift index 54f59f4b..374d2a02 100644 --- a/Sources/ViewTypes/FormWithGroupedStyle.swift +++ b/Sources/ViewTypes/FormWithGroupedStyle.swift @@ -81,7 +81,7 @@ public struct FormWithGroupedStyleType: IntrospectableViewType { } extension IntrospectableViewType where Self == FormWithGroupedStyleType { - @MainActor public static func form(style: Self.Style) -> Self { .init() } + public static func form(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/FullScreenCover.swift b/Sources/ViewTypes/FullScreenCover.swift index 6e297185..2e122a9a 100644 --- a/Sources/ViewTypes/FullScreenCover.swift +++ b/Sources/ViewTypes/FullScreenCover.swift @@ -66,7 +66,7 @@ public struct FullScreenCoverType: IntrospectableViewType { #if !os(macOS) extension IntrospectableViewType where Self == FullScreenCoverType { - @MainActor public static var fullScreenCover: Self { .init() } + public static var fullScreenCover: Self { .init() } } #if canImport(UIKit) @@ -79,7 +79,7 @@ extension iOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.presentationController }) } } @@ -93,7 +93,7 @@ extension tvOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.presentationController }) } } @@ -102,7 +102,7 @@ extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) public static let v2 = Self(for: .v2, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.presentationController }) } } diff --git a/Sources/ViewTypes/List.swift b/Sources/ViewTypes/List.swift index 9ee6d7ac..e623746f 100644 --- a/Sources/ViewTypes/List.swift +++ b/Sources/ViewTypes/List.swift @@ -80,8 +80,8 @@ public struct ListType: IntrospectableViewType { } extension IntrospectableViewType where Self == ListType { - @MainActor public static var list: Self { .init() } - @MainActor public static func list(style: Self.Style) -> Self { .init() } + public static var list: Self { .init() } + public static func list(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ListCell.swift b/Sources/ViewTypes/ListCell.swift index 7d40fa12..0fc45c43 100644 --- a/Sources/ViewTypes/ListCell.swift +++ b/Sources/ViewTypes/ListCell.swift @@ -78,7 +78,7 @@ public struct ListCellType: IntrospectableViewType { } extension IntrospectableViewType where Self == ListCellType { - @MainActor public static var listCell: Self { .init() } + public static var listCell: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ListWithBorderedStyle.swift b/Sources/ViewTypes/ListWithBorderedStyle.swift index ab8a7306..2aa80ed0 100644 --- a/Sources/ViewTypes/ListWithBorderedStyle.swift +++ b/Sources/ViewTypes/ListWithBorderedStyle.swift @@ -40,7 +40,7 @@ public struct ListWithBorderedStyleType: IntrospectableViewType { #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ListWithBorderedStyleType { - @MainActor public static func list(style: Self.Style) -> Self { .init() } + public static func list(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) diff --git a/Sources/ViewTypes/ListWithGroupedStyle.swift b/Sources/ViewTypes/ListWithGroupedStyle.swift index fb041297..27a11975 100644 --- a/Sources/ViewTypes/ListWithGroupedStyle.swift +++ b/Sources/ViewTypes/ListWithGroupedStyle.swift @@ -71,7 +71,7 @@ public struct ListWithGroupedStyleType: IntrospectableViewType { #if !os(macOS) extension IntrospectableViewType where Self == ListWithGroupedStyleType { - @MainActor public static func list(style: Self.Style) -> Self { .init() } + public static func list(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ListWithInsetGroupedStyle.swift b/Sources/ViewTypes/ListWithInsetGroupedStyle.swift index 5bc535fb..d31872ab 100644 --- a/Sources/ViewTypes/ListWithInsetGroupedStyle.swift +++ b/Sources/ViewTypes/ListWithInsetGroupedStyle.swift @@ -57,7 +57,7 @@ public struct ListWithInsetGroupedStyleType: IntrospectableViewType { #if !os(tvOS) && !os(macOS) extension IntrospectableViewType where Self == ListWithInsetGroupedStyleType { - @MainActor public static func list(style: Self.Style) -> Self { .init() } + public static func list(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ListWithInsetStyle.swift b/Sources/ViewTypes/ListWithInsetStyle.swift index 88058fec..9e14d88d 100644 --- a/Sources/ViewTypes/ListWithInsetStyle.swift +++ b/Sources/ViewTypes/ListWithInsetStyle.swift @@ -71,7 +71,7 @@ public struct ListWithInsetStyleType: IntrospectableViewType { #if !os(tvOS) extension IntrospectableViewType where Self == ListWithInsetStyleType { - @MainActor public static func list(style: Self.Style) -> Self { .init() } + public static func list(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ListWithSidebarStyle.swift b/Sources/ViewTypes/ListWithSidebarStyle.swift index 1557d95a..c6baff58 100644 --- a/Sources/ViewTypes/ListWithSidebarStyle.swift +++ b/Sources/ViewTypes/ListWithSidebarStyle.swift @@ -71,7 +71,7 @@ public struct ListWithSidebarStyleType: IntrospectableViewType { #if !os(tvOS) extension IntrospectableViewType where Self == ListWithSidebarStyleType { - @MainActor public static func list(style: Self.Style) -> Self { .init() } + public static func list(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/Map.swift b/Sources/ViewTypes/Map.swift index 97d0f849..0268895b 100644 --- a/Sources/ViewTypes/Map.swift +++ b/Sources/ViewTypes/Map.swift @@ -68,7 +68,7 @@ public struct MapType: IntrospectableViewType {} import MapKit extension IntrospectableViewType where Self == MapType { - @MainActor public static var map: Self { .init() } + public static var map: Self { .init() } } extension iOSViewVersion { diff --git a/Sources/ViewTypes/NavigationSplitView.swift b/Sources/ViewTypes/NavigationSplitView.swift index 7a125144..195bb9ea 100644 --- a/Sources/ViewTypes/NavigationSplitView.swift +++ b/Sources/ViewTypes/NavigationSplitView.swift @@ -73,7 +73,7 @@ import SwiftUI public struct NavigationSplitViewType: IntrospectableViewType {} extension IntrospectableViewType where Self == NavigationSplitViewType { - @MainActor public static var navigationSplitView: Self { .init() } + public static var navigationSplitView: Self { .init() } } #if canImport(UIKit) @@ -89,7 +89,7 @@ extension iOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.splitViewController } } } @@ -106,7 +106,7 @@ extension tvOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } } } @@ -115,7 +115,7 @@ extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) public static let v2 = Self(for: .v2, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.splitViewController } } } diff --git a/Sources/ViewTypes/NavigationStack.swift b/Sources/ViewTypes/NavigationStack.swift index 07e9fe09..26ee12bf 100644 --- a/Sources/ViewTypes/NavigationStack.swift +++ b/Sources/ViewTypes/NavigationStack.swift @@ -54,7 +54,7 @@ import SwiftUI public struct NavigationStackType: IntrospectableViewType {} extension IntrospectableViewType where Self == NavigationStackType { - @MainActor public static var navigationStack: Self { .init() } + public static var navigationStack: Self { .init() } } #if canImport(UIKit) @@ -70,7 +70,7 @@ extension iOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } } } @@ -87,7 +87,7 @@ extension tvOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } } } @@ -96,7 +96,7 @@ extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) public static let v2 = Self(for: .v2, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } } } diff --git a/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift b/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift index a4eef396..94e8e72b 100644 --- a/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift +++ b/Sources/ViewTypes/NavigationViewWithColumnsStyle.swift @@ -73,7 +73,7 @@ public struct NavigationViewWithColumnsStyleType: IntrospectableViewType { } extension IntrospectableViewType where Self == NavigationViewWithColumnsStyleType { - @MainActor public static func navigationView(style: Self.Style) -> Self { .init() } + public static func navigationView(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) @@ -85,7 +85,7 @@ extension iOSViewVersion { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.splitViewController } } } @@ -98,7 +98,7 @@ extension tvOSViewVersion { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } } } @@ -107,7 +107,7 @@ extension visionOSViewVersion { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.splitViewController } } } diff --git a/Sources/ViewTypes/NavigationViewWithStackStyle.swift b/Sources/ViewTypes/NavigationViewWithStackStyle.swift index ff47def3..f44064b3 100644 --- a/Sources/ViewTypes/NavigationViewWithStackStyle.swift +++ b/Sources/ViewTypes/NavigationViewWithStackStyle.swift @@ -61,7 +61,7 @@ public struct NavigationViewWithStackStyleType: IntrospectableViewType { } extension IntrospectableViewType where Self == NavigationViewWithStackStyleType { - @MainActor public static func navigationView(style: Self.Style) -> Self { .init() } + public static func navigationView(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) @@ -73,7 +73,7 @@ extension iOSViewVersion { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } } } @@ -86,7 +86,7 @@ extension tvOSViewVersion { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } } } @@ -95,7 +95,7 @@ extension visionOSViewVersion { + private static var selector: IntrospectionSelector { .default.withAncestorSelector { $0.navigationController } } } diff --git a/Sources/ViewTypes/PageControl.swift b/Sources/ViewTypes/PageControl.swift index 1ae4b77c..a16304e5 100644 --- a/Sources/ViewTypes/PageControl.swift +++ b/Sources/ViewTypes/PageControl.swift @@ -60,7 +60,7 @@ import SwiftUI public struct PageControlType: IntrospectableViewType {} extension IntrospectableViewType where Self == PageControlType { - @MainActor public static var pageControl: Self { .init() } + public static var pageControl: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/PickerWithMenuStyle.swift b/Sources/ViewTypes/PickerWithMenuStyle.swift index 0e946212..2a7079e2 100644 --- a/Sources/ViewTypes/PickerWithMenuStyle.swift +++ b/Sources/ViewTypes/PickerWithMenuStyle.swift @@ -42,7 +42,7 @@ public struct PickerWithMenuStyleType: IntrospectableViewType { #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == PickerWithMenuStyleType { - @MainActor public static func picker(style: Self.Style) -> Self { .init() } + public static func picker(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) diff --git a/Sources/ViewTypes/PickerWithSegmentedStyle.swift b/Sources/ViewTypes/PickerWithSegmentedStyle.swift index 4eddbb9c..7ad1ff04 100644 --- a/Sources/ViewTypes/PickerWithSegmentedStyle.swift +++ b/Sources/ViewTypes/PickerWithSegmentedStyle.swift @@ -89,7 +89,7 @@ public struct PickerWithSegmentedStyleType: IntrospectableViewType { } extension IntrospectableViewType where Self == PickerWithSegmentedStyleType { - @MainActor public static func picker(style: Self.Style) -> Self { .init() } + public static func picker(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/PickerWithWheelStyle.swift b/Sources/ViewTypes/PickerWithWheelStyle.swift index a5527356..991fff35 100644 --- a/Sources/ViewTypes/PickerWithWheelStyle.swift +++ b/Sources/ViewTypes/PickerWithWheelStyle.swift @@ -58,7 +58,7 @@ public struct PickerWithWheelStyleType: IntrospectableViewType { #if !os(tvOS) && !os(macOS) extension IntrospectableViewType where Self == PickerWithWheelStyleType { - @MainActor public static func picker(style: Self.Style) -> Self { .init() } + public static func picker(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/Popover.swift b/Sources/ViewTypes/Popover.swift index 45f3e771..2f28ab4c 100644 --- a/Sources/ViewTypes/Popover.swift +++ b/Sources/ViewTypes/Popover.swift @@ -52,7 +52,7 @@ public struct PopoverType: IntrospectableViewType { #if !os(tvOS) && !os(macOS) extension IntrospectableViewType where Self == PopoverType { - @MainActor public static var popover: Self { .init() } + public static var popover: Self { .init() } } #if canImport(UIKit) @@ -64,7 +64,7 @@ extension iOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.popoverPresentationController }) } } @@ -73,7 +73,7 @@ extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) public static let v2 = Self(for: .v2, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.popoverPresentationController }) } } diff --git a/Sources/ViewTypes/ProgressViewWithCircularStyle.swift b/Sources/ViewTypes/ProgressViewWithCircularStyle.swift index 57cceb3b..d6a79677 100644 --- a/Sources/ViewTypes/ProgressViewWithCircularStyle.swift +++ b/Sources/ViewTypes/ProgressViewWithCircularStyle.swift @@ -65,7 +65,7 @@ public struct ProgressViewWithCircularStyleType: IntrospectableViewType { } extension IntrospectableViewType where Self == ProgressViewWithCircularStyleType { - @MainActor public static func progressView(style: Self.Style) -> Self { .init() } + public static func progressView(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ProgressViewWithLinearStyle.swift b/Sources/ViewTypes/ProgressViewWithLinearStyle.swift index 4d529a01..9c436166 100644 --- a/Sources/ViewTypes/ProgressViewWithLinearStyle.swift +++ b/Sources/ViewTypes/ProgressViewWithLinearStyle.swift @@ -65,7 +65,7 @@ public struct ProgressViewWithLinearStyleType: IntrospectableViewType { } extension IntrospectableViewType where Self == ProgressViewWithLinearStyleType { - @MainActor public static func progressView(style: Self.Style) -> Self { .init() } + public static func progressView(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ScrollView.swift b/Sources/ViewTypes/ScrollView.swift index 89f69be5..c449c7f4 100644 --- a/Sources/ViewTypes/ScrollView.swift +++ b/Sources/ViewTypes/ScrollView.swift @@ -65,7 +65,7 @@ import SwiftUI public struct ScrollViewType: IntrospectableViewType {} extension IntrospectableViewType where Self == ScrollViewType { - @MainActor public static var scrollView: Self { .init() } + public static var scrollView: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/SearchField.swift b/Sources/ViewTypes/SearchField.swift index 05b7f666..ce7129ce 100644 --- a/Sources/ViewTypes/SearchField.swift +++ b/Sources/ViewTypes/SearchField.swift @@ -66,7 +66,7 @@ import SwiftUI public struct SearchFieldType: IntrospectableViewType {} extension IntrospectableViewType where Self == SearchFieldType { - @MainActor public static var searchField: Self { .init() } + public static var searchField: Self { .init() } } #if canImport(UIKit) @@ -80,7 +80,7 @@ extension iOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UINavigationController.self) { $0.viewIfLoaded?.allDescendants.lazy.compactMap { $0 as? UISearchBar }.first } @@ -97,7 +97,7 @@ extension tvOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UINavigationController.self) { $0.viewIfLoaded?.allDescendants.lazy.compactMap { $0 as? UISearchBar }.first } @@ -108,7 +108,7 @@ extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) public static let v2 = Self(for: .v2, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UINavigationController.self) { $0.viewIfLoaded?.allDescendants.lazy.compactMap { $0 as? UISearchBar }.first } diff --git a/Sources/ViewTypes/SecureField.swift b/Sources/ViewTypes/SecureField.swift index 8fa8a565..f8d330c4 100644 --- a/Sources/ViewTypes/SecureField.swift +++ b/Sources/ViewTypes/SecureField.swift @@ -65,7 +65,7 @@ import SwiftUI public struct SecureFieldType: IntrospectableViewType {} extension IntrospectableViewType where Self == SecureFieldType { - @MainActor public static var secureField: Self { .init() } + public static var secureField: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/Sheet.swift b/Sources/ViewTypes/Sheet.swift index b99aa576..cb7619bc 100644 --- a/Sources/ViewTypes/Sheet.swift +++ b/Sources/ViewTypes/Sheet.swift @@ -66,7 +66,7 @@ public struct SheetType: IntrospectableViewType { #if !os(macOS) extension IntrospectableViewType where Self == SheetType { - @MainActor public static var sheet: Self { .init() } + public static var sheet: Self { .init() } } #if canImport(UIKit) @@ -78,7 +78,7 @@ extension iOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.presentationController }) } } @@ -95,7 +95,7 @@ extension iOSViewVersion { @_disfavoredOverload public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.sheetPresentationController }) } } @@ -105,7 +105,7 @@ extension visionOSViewVersion { public static let v1 = Self(for: .v1, selector: selector) public static let v2 = Self(for: .v2, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.sheetPresentationController }) } } @@ -119,7 +119,7 @@ extension tvOSViewVersion { public static let v17 = Self(for: .v17, selector: selector) public static let v18 = Self(for: .v18, selector: selector) - @MainActor private static var selector: IntrospectionSelector { + private static var selector: IntrospectionSelector { .from(UIViewController.self, selector: { $0.presentationController }) } } diff --git a/Sources/ViewTypes/Slider.swift b/Sources/ViewTypes/Slider.swift index 7cc09183..34e283b8 100644 --- a/Sources/ViewTypes/Slider.swift +++ b/Sources/ViewTypes/Slider.swift @@ -44,7 +44,7 @@ public struct SliderType: IntrospectableViewType {} #if !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == SliderType { - @MainActor public static var slider: Self { .init() } + public static var slider: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/Stepper.swift b/Sources/ViewTypes/Stepper.swift index 3379d6bc..40e6dd1b 100644 --- a/Sources/ViewTypes/Stepper.swift +++ b/Sources/ViewTypes/Stepper.swift @@ -44,7 +44,7 @@ public struct StepperType: IntrospectableViewType {} #if !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == StepperType { - @MainActor public static var stepper: Self { .init() } + public static var stepper: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/TabView.swift b/Sources/ViewTypes/TabView.swift index cf8b9bfa..a4657d4b 100644 --- a/Sources/ViewTypes/TabView.swift +++ b/Sources/ViewTypes/TabView.swift @@ -58,7 +58,7 @@ public struct TabViewType: IntrospectableViewType {} #if !os(visionOS) extension IntrospectableViewType where Self == TabViewType { - @MainActor public static var tabView: Self { .init() } + public static var tabView: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/TabViewWithPageStyle.swift b/Sources/ViewTypes/TabViewWithPageStyle.swift index 1dfc5d1e..eaada897 100644 --- a/Sources/ViewTypes/TabViewWithPageStyle.swift +++ b/Sources/ViewTypes/TabViewWithPageStyle.swift @@ -65,7 +65,7 @@ public struct TabViewWithPageStyleType: IntrospectableViewType { #if !os(macOS) extension IntrospectableViewType where Self == TabViewWithPageStyleType { - @MainActor public static func tabView(style: Self.Style) -> Self { .init() } + public static func tabView(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/Table.swift b/Sources/ViewTypes/Table.swift index 756ef7bf..4baee5ff 100644 --- a/Sources/ViewTypes/Table.swift +++ b/Sources/ViewTypes/Table.swift @@ -106,7 +106,7 @@ public struct TableType: IntrospectableViewType {} #if !os(tvOS) extension IntrospectableViewType where Self == TableType { - @MainActor public static var table: Self { .init() } + public static var table: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/TextEditor.swift b/Sources/ViewTypes/TextEditor.swift index 760fe11d..d97ffcc8 100644 --- a/Sources/ViewTypes/TextEditor.swift +++ b/Sources/ViewTypes/TextEditor.swift @@ -55,7 +55,7 @@ public struct TextEditorType: IntrospectableViewType {} #if !os(tvOS) extension IntrospectableViewType where Self == TextEditorType { - @MainActor public static var textEditor: Self { .init() } + public static var textEditor: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/TextField.swift b/Sources/ViewTypes/TextField.swift index 76f90caf..7abc2ac6 100644 --- a/Sources/ViewTypes/TextField.swift +++ b/Sources/ViewTypes/TextField.swift @@ -65,7 +65,7 @@ import SwiftUI public struct TextFieldType: IntrospectableViewType {} extension IntrospectableViewType where Self == TextFieldType { - @MainActor public static var textField: Self { .init() } + public static var textField: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/TextFieldWithVerticalAxis.swift b/Sources/ViewTypes/TextFieldWithVerticalAxis.swift index 2d9478dd..d76a453c 100644 --- a/Sources/ViewTypes/TextFieldWithVerticalAxis.swift +++ b/Sources/ViewTypes/TextFieldWithVerticalAxis.swift @@ -69,7 +69,7 @@ public struct TextFieldWithVerticalAxisType: IntrospectableViewType { } extension IntrospectableViewType where Self == TextFieldWithVerticalAxisType { - @MainActor public static func textField(axis: Self.Axis) -> Self { .init() } + public static func textField(axis: Self.Axis) -> Self { .init() } } // MARK: SwiftUI.TextField(..., axis: .vertical) - iOS diff --git a/Sources/ViewTypes/Toggle.swift b/Sources/ViewTypes/Toggle.swift index 0914722c..c8924a2d 100644 --- a/Sources/ViewTypes/Toggle.swift +++ b/Sources/ViewTypes/Toggle.swift @@ -44,7 +44,7 @@ public struct ToggleType: IntrospectableViewType {} #if !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ToggleType { - @MainActor public static var toggle: Self { .init() } + public static var toggle: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ToggleWithButtonStyle.swift b/Sources/ViewTypes/ToggleWithButtonStyle.swift index 83d34018..d5f9fe43 100644 --- a/Sources/ViewTypes/ToggleWithButtonStyle.swift +++ b/Sources/ViewTypes/ToggleWithButtonStyle.swift @@ -38,7 +38,7 @@ public struct ToggleWithButtonStyleType: IntrospectableViewType { #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ToggleWithButtonStyleType { - @MainActor public static func toggle(style: Self.Style) -> Self { .init() } + public static func toggle(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) diff --git a/Sources/ViewTypes/ToggleWithCheckboxStyle.swift b/Sources/ViewTypes/ToggleWithCheckboxStyle.swift index ea1d5f48..ee7844ab 100644 --- a/Sources/ViewTypes/ToggleWithCheckboxStyle.swift +++ b/Sources/ViewTypes/ToggleWithCheckboxStyle.swift @@ -38,7 +38,7 @@ public struct ToggleWithCheckboxStyleType: IntrospectableViewType { #if !os(iOS) && !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ToggleWithCheckboxStyleType { - @MainActor public static func toggle(style: Self.Style) -> Self { .init() } + public static func toggle(style: Self.Style) -> Self { .init() } } #if canImport(AppKit) && !targetEnvironment(macCatalyst) diff --git a/Sources/ViewTypes/ToggleWithSwitchStyle.swift b/Sources/ViewTypes/ToggleWithSwitchStyle.swift index c76221b3..2788a36e 100644 --- a/Sources/ViewTypes/ToggleWithSwitchStyle.swift +++ b/Sources/ViewTypes/ToggleWithSwitchStyle.swift @@ -50,7 +50,7 @@ public struct ToggleWithSwitchStyleType: IntrospectableViewType { #if !os(tvOS) && !os(visionOS) extension IntrospectableViewType where Self == ToggleWithSwitchStyleType { - @MainActor public static func toggle(style: Self.Style) -> Self { .init() } + public static func toggle(style: Self.Style) -> Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/VideoPlayer.swift b/Sources/ViewTypes/VideoPlayer.swift index e43ae6de..be50449c 100644 --- a/Sources/ViewTypes/VideoPlayer.swift +++ b/Sources/ViewTypes/VideoPlayer.swift @@ -60,7 +60,7 @@ public struct VideoPlayerType: IntrospectableViewType {} import AVKit extension IntrospectableViewType where Self == VideoPlayerType { - @MainActor public static var videoPlayer: Self { .init() } + public static var videoPlayer: Self { .init() } } #if canImport(UIKit) diff --git a/Sources/ViewTypes/ViewController.swift b/Sources/ViewTypes/ViewController.swift index 76ce2db3..86c3941d 100644 --- a/Sources/ViewTypes/ViewController.swift +++ b/Sources/ViewTypes/ViewController.swift @@ -69,7 +69,7 @@ public struct ViewControllerType: IntrospectableViewType { } extension IntrospectableViewType where Self == ViewControllerType { - @MainActor public static var viewController: Self { .init() } + public static var viewController: Self { .init() } } #if canImport(UIKit)