Skip to content

Commit c57923f

Browse files
committed
temp
1 parent 6c046ce commit c57923f

File tree

5 files changed

+68
-28
lines changed

5 files changed

+68
-28
lines changed

Sources/ViewTypes/NavigationSplitView.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ extension iOSViewVersion<NavigationSplitViewType, UISplitViewController> {
1717
@available(*, unavailable, message: "NavigationSplitView isn't available on iOS 15")
1818
public static let v15 = Self.unavailable()
1919

20-
public static let v16 = Self(for: .v16)
20+
public static let v16 = Self(for: .v16, selector: selector)
21+
22+
private static var selector: IntrospectionSelector<UISplitViewController> {
23+
.default.withAncestorSelector(\.splitViewController)
24+
}
2125
}
2226

2327
extension tvOSViewVersion<NavigationSplitViewType, UINavigationController> {
@@ -28,7 +32,11 @@ extension tvOSViewVersion<NavigationSplitViewType, UINavigationController> {
2832
@available(*, unavailable, message: "NavigationSplitView isn't available on tvOS 15")
2933
public static let v15 = Self.unavailable()
3034

31-
public static let v16 = Self(for: .v16)
35+
public static let v16 = Self(for: .v16, selector: selector)
36+
37+
private static var selector: IntrospectionSelector<UINavigationController> {
38+
.default.withAncestorSelector(\.navigationController)
39+
}
3240
}
3341
#elseif canImport(AppKit)
3442
extension macOSViewVersion<NavigationSplitViewType, NSSplitView> {

Sources/ViewTypes/NavigationStack.swift

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ extension iOSViewVersion<NavigationStackType, UINavigationController> {
1717
@available(*, unavailable, message: "NavigationStack isn't available on iOS 15")
1818
public static let v15 = Self.unavailable()
1919

20-
public static let v16 = Self(for: .v16)
20+
public static let v16 = Self(for: .v16, selector: selector)
21+
22+
private static var selector: IntrospectionSelector<UINavigationController> {
23+
.default.withAncestorSelector(\.navigationController)
24+
}
2125
}
2226

2327
extension tvOSViewVersion<NavigationStackType, UINavigationController> {
@@ -28,6 +32,10 @@ extension tvOSViewVersion<NavigationStackType, UINavigationController> {
2832
@available(*, unavailable, message: "NavigationStack isn't available on tvOS 15")
2933
public static let v15 = Self.unavailable()
3034

31-
public static let v16 = Self(for: .v16)
35+
public static let v16 = Self(for: .v16, selector: selector)
36+
37+
private static var selector: IntrospectionSelector<UINavigationController> {
38+
.default.withAncestorSelector(\.navigationController)
39+
}
3240
}
3341
#endif

Sources/ViewTypes/NavigationViewWithColumnsStyle.swift

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,25 @@ extension IntrospectableViewType where Self == NavigationViewWithColumnsStyleTyp
1414

1515
#if canImport(UIKit)
1616
extension iOSViewVersion<NavigationViewWithColumnsStyleType, UISplitViewController> {
17-
public static let v13 = Self(for: .v13)
18-
public static let v14 = Self(for: .v14)
19-
public static let v15 = Self(for: .v15)
20-
public static let v16 = Self(for: .v16)
17+
public static let v13 = Self(for: .v13, selector: selector)
18+
public static let v14 = Self(for: .v14, selector: selector)
19+
public static let v15 = Self(for: .v15, selector: selector)
20+
public static let v16 = Self(for: .v16, selector: selector)
21+
22+
private static var selector: IntrospectionSelector<UISplitViewController> {
23+
.default.withAncestorSelector(\.splitViewController)
24+
}
2125
}
2226

2327
extension tvOSViewVersion<NavigationViewWithColumnsStyleType, UINavigationController> {
24-
public static let v13 = Self(for: .v13)
25-
public static let v14 = Self(for: .v14)
26-
public static let v15 = Self(for: .v15)
27-
public static let v16 = Self(for: .v16)
28+
public static let v13 = Self(for: .v13, selector: selector)
29+
public static let v14 = Self(for: .v14, selector: selector)
30+
public static let v15 = Self(for: .v15, selector: selector)
31+
public static let v16 = Self(for: .v16, selector: selector)
32+
33+
private static var selector: IntrospectionSelector<UINavigationController> {
34+
.default.withAncestorSelector(\.navigationController)
35+
}
2836
}
2937
#elseif canImport(AppKit)
3038
extension macOSViewVersion<NavigationViewWithColumnsStyleType, NSSplitView> {

Sources/ViewTypes/NavigationViewWithStackStyle.swift

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,24 @@ extension IntrospectableViewType where Self == NavigationViewWithStackStyleType
1414

1515
#if canImport(UIKit)
1616
extension iOSViewVersion<NavigationViewWithStackStyleType, UINavigationController> {
17-
public static let v13 = Self(for: .v13)
18-
public static let v14 = Self(for: .v14)
19-
public static let v15 = Self(for: .v15)
20-
public static let v16 = Self(for: .v16)
17+
public static let v13 = Self(for: .v13, selector: selector)
18+
public static let v14 = Self(for: .v14, selector: selector)
19+
public static let v15 = Self(for: .v15, selector: selector)
20+
public static let v16 = Self(for: .v16, selector: selector)
21+
22+
private static var selector: IntrospectionSelector<UINavigationController> {
23+
.default.withAncestorSelector(\.navigationController)
24+
}
2125
}
2226

2327
extension tvOSViewVersion<NavigationViewWithStackStyleType, UINavigationController> {
24-
public static let v13 = Self(for: .v13)
25-
public static let v14 = Self(for: .v14)
26-
public static let v15 = Self(for: .v15)
27-
public static let v16 = Self(for: .v16)
28+
public static let v13 = Self(for: .v13, selector: selector)
29+
public static let v14 = Self(for: .v14, selector: selector)
30+
public static let v15 = Self(for: .v15, selector: selector)
31+
public static let v16 = Self(for: .v16, selector: selector)
32+
33+
private static var selector: IntrospectionSelector<UINavigationController> {
34+
.default.withAncestorSelector(\.navigationController)
35+
}
2836
}
2937
#endif

Sources/ViewTypes/TabView.swift

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,25 @@ extension IntrospectableViewType where Self == TabViewType {
1010

1111
#if canImport(UIKit)
1212
extension iOSViewVersion<TabViewType, UITabBarController> {
13-
public static let v13 = Self(for: .v13)
14-
public static let v14 = Self(for: .v14)
15-
public static let v15 = Self(for: .v15)
16-
public static let v16 = Self(for: .v16)
13+
public static let v13 = Self(for: .v13, selector: selector)
14+
public static let v14 = Self(for: .v14, selector: selector)
15+
public static let v15 = Self(for: .v15, selector: selector)
16+
public static let v16 = Self(for: .v16, selector: selector)
17+
18+
private static var selector: IntrospectionSelector<UITabBarController> {
19+
.default.withAncestorSelector(\.tabBarController)
20+
}
1721
}
1822

1923
extension tvOSViewVersion<TabViewType, UITabBarController> {
20-
public static let v13 = Self(for: .v13)
21-
public static let v14 = Self(for: .v14)
22-
public static let v15 = Self(for: .v15)
23-
public static let v16 = Self(for: .v16)
24+
public static let v13 = Self(for: .v13, selector: selector)
25+
public static let v14 = Self(for: .v14, selector: selector)
26+
public static let v15 = Self(for: .v15, selector: selector)
27+
public static let v16 = Self(for: .v16, selector: selector)
28+
29+
private static var selector: IntrospectionSelector<UITabBarController> {
30+
.default.withAncestorSelector(\.tabBarController)
31+
}
2432
}
2533
#elseif canImport(AppKit)
2634
extension macOSViewVersion<TabViewType, NSTabView> {

0 commit comments

Comments
 (0)