ToggleWithSwitchStyleType
@MainActor
public struct ToggleWithSwitchStyleType : IntrospectableViewTypeAn abstract representation of the Toggle type in SwiftUI, with .switch style.
struct ContentView: View {
    @State var isOn = false
    var body: some View {
        Toggle("Switch", isOn: $isOn)
            .toggleStyle(.switch)
            .introspect(.toggle(style: .switch), on: .iOS(.all)) {
                print(type(of: $0)) // UISwitch
            }
    }
}
 View on GitHub
View on GitHub