Compose SwiftUIv0.4.0
esc
GuideAPIGitHub
View modifier

toggleStyle(_:)

A view modifier that maps SwiftUI's toggleStyle.

iOS 17.0+macOS 14.0+tvOS 17.0+watchOS 10.0+
fun Modifier.toggleStyle(style: ToggleStyle): Modifier

Overview

Modifier.toggleStyle(style = ToggleStyle.…)

This is the Kotlin form of SwiftUI View.toggleStyle(_:): SwiftUI documentation. In Swift it reads:

nonisolated func toggleStyle<S>(_ style: S) -> some View where S : ToggleStyle

Topics

Overloads

fun Modifier.toggleStyle(style: ToggleStyle): Modifier
SwiftUI View.toggleStyle(_:)