Skip to content

Instantly share code, notes, and snippets.

@meyusufdemirci
Last active June 9, 2022 21:23
Show Gist options
  • Save meyusufdemirci/163f3e14318f2fbc7ec3666a202323cd to your computer and use it in GitHub Desktop.
Save meyusufdemirci/163f3e14318f2fbc7ec3666a202323cd to your computer and use it in GitHub Desktop.
What is New in SwiftUI, WWDC 22 Article
@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