Last active
June 9, 2022 21:23
-
-
Save meyusufdemirci/163f3e14318f2fbc7ec3666a202323cd to your computer and use it in GitHub Desktop.
What is New in SwiftUI, WWDC 22 Article
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@State var profileNotificationsIsOn: Bool = false | |
@State var campaignNotificationsIsOn: Bool = false | |
@State var emailNotificationsIsOn: Bool = false | |
var body: some View { | |
DisclosureGroup { | |
Toggle("Profile Notifications", isOn: $profileNotificationsIsOn) | |
Toggle("Campaign Notifications", isOn: $campaignNotificationsIsOn) | |
Toggle("E-Mail Notifications", isOn: $emailNotificationsIsOn) | |
} label: { | |
Toggle("Notifications", isOn: [ | |
$profileNotificationsIsOn, | |
$campaignNotificationsIsOn, | |
$emailNotificationsIsOn | |
]) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment