Skip to content

Commit f8b3321

Browse files
committed
Update package
1 parent a87616c commit f8b3321

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Sources/Intramodular/Presentation/AnyPresentationView.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,18 @@ public struct AnyPresentationView: View {
6161
#endif
6262
}
6363
#endif
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
6476
}
6577

6678
// MARK: - Conformances -

0 commit comments

Comments
 (0)