Adds support for macOS

This commit is contained in:
Shaps Benkau 2023-01-31 14:50:18 +00:00
parent 70abdd08b7
commit 2cf2c091c3
4 changed files with 7 additions and 1 deletions

View File

@ -85,7 +85,7 @@ extension View {
inject(InspectionView(selector: selector, customize: customize))
}
func controller(_ customize: @escaping (UIViewController?) -> Void) -> some View {
func controller(_ customize: @escaping (PlatformViewController?) -> Void) -> some View {
inspect { inspector in
inspector.sourceController.view
} customize: { view in

View File

@ -1,3 +1,4 @@
#if os(iOS)
import SwiftUI
struct ToolbarViews {
@ -33,3 +34,4 @@ internal extension EnvironmentValues {
set { self[ToolbarVisibilityKey.self] = newValue }
}
}
#endif

View File

@ -1,3 +1,4 @@
#if os(iOS)
import SwiftUI
public extension Backport<Any> {
@ -56,3 +57,4 @@ public extension Backport<Any> {
// )
// }
//}
#endif

View File

@ -1,3 +1,4 @@
#if os(iOS)
import SwiftUI
internal struct ToolbarBackgroundModifier: ViewModifier {
@ -91,3 +92,4 @@ internal struct ToolbarBackgroundModifier: ViewModifier {
private final class ControllerWrapper: ObservableObject {
weak var controller: UIViewController?
}
#endif