We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a87616c commit f8b3321Copy full SHA for f8b3321
Sources/Intramodular/Presentation/AnyPresentationView.swift
@@ -61,6 +61,18 @@ public struct AnyPresentationView: View {
61
#endif
62
}
63
64
+
65
+ #if os(iOS) || os(macOS) || os(tvOS) || targetEnvironment(macCatalyst)
66
+ /// Convert to an AppKit/UIKit view controller.
67
+ public func _toAppKitOrUIKitViewController() -> AppKitOrUIKitViewController {
68
+ switch base {
69
+ case .native:
70
+ return CocoaHostingController(mainView: self)
71
+ case .appKitOrUIKitViewController(let viewController):
72
+ return viewController
73
+ }
74
75
+ #endif
76
77
78
// MARK: - Conformances -
0 commit comments