Skip to content

Instantly share code, notes, and snippets.

@jordansinger
Last active July 3, 2020 15:00
Show Gist options
  • Select an option

  • Save jordansinger/d039f8ea0a852446b9d5394b51e41e82 to your computer and use it in GitHub Desktop.

Select an option

Save jordansinger/d039f8ea0a852446b9d5394b51e41e82 to your computer and use it in GitHub Desktop.
Run this in Swift Playgrounds on iPad or Mac
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