SheetType
@MainActor
public struct SheetType : IntrospectableViewType
An abstract representation of .sheet
in SwiftUI.
public struct ContentView: View {
@State var isPresented = false
public var body: some View {
Button("Present", action: { isPresented = true })
.sheet(isPresented: $isPresented) {
Button("Dismiss", action: { isPresented = false })
.introspect(.sheet, on: .iOS(.all)) {
print(type(of: $0)) // UIPresentationController
}
}
}
}
-
Declaration
Swift
@MainActor public var scope: IntrospectionScope { get }