Last active
July 3, 2020 15:00
-
-
Save jordansinger/d039f8ea0a852446b9d5394b51e41e82 to your computer and use it in GitHub Desktop.
Run this in Swift Playgrounds on iPad or Mac
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
| import SwiftUI | |
| import PlaygroundSupport | |
| struct ContentView: View { | |
| @State var notificationsEnabled = true | |
| var body: some View { | |
| Toggle("Notifications", isOn: $notificationsEnabled) | |
| .padding() | |
| .frame(width: 375, height: 64) | |
| .background(Color(UIColor.quaternarySystemFill)) | |
| .cornerRadius(20) | |
| } | |
| } | |
| PlaygroundPage.current.setLiveView(ContentView()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment