Structure
DSUISwitchCell
@available(iOS 13.0, tvOS 13.0, *)
public struct DSUISwitchCell: View
An Enterprise-styled option selection element for use in SwiftUI views.
Initialize and set parameters as needed.
DSUISwitchCell(labelText: "Notifications",
isOn: $isNotificationsOn,
sharedBackgroundColor: $rowBackgroundColor)
The isOn binding will let you know the current state of the switch, true for on and false for off.
When using this component in a cell, the background color should be changed when the component is disabled. To let DSUISwitchCell handle this for you, provide a color binding and set your background to the color. If this component will never be disabled, you can ignore it.
Relationships
Conforms To
View
Initializers
Properties
body
public var body: some View