On/Off with Toggle
Bind a Toggle to a boolean setting.
Meet the Toggle
A Toggle is SwiftUI's on/off switch. It is perfect for settings like notifications, dark mode, or any yes-or-no choice. 🔘
Toggle Needs a Boolean
Every Toggle reflects a Bool value. When the switch is on the value is true; when it is off the value is false. They stay in sync.