Skip to content

Instantly share code, notes, and snippets.

@jordansinger
Created July 12, 2020 00:49
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jordansinger/9b433a0076adb985cc3ebc4e1ab61eeb to your computer and use it in GitHub Desktop.
Save jordansinger/9b433a0076adb985cc3ebc4e1ab61eeb to your computer and use it in GitHub Desktop.
import SwiftUI
import PlaygroundSupport
struct ContentView: View {
var body: some View {
VStack(spacing: 24) {
Text("Apple TV")
.font(.headline)
Rectangle()
.foregroundColor(Color(UIColor.secondarySystemBackground))
.cornerRadius(40)
HStack(spacing: 24) {
VStack(spacing: 16) {
Button(icon: "mic.fill")
Button(icon: "playpause.fill")
}
VStack {
Text("MENU")
.font(.headline)
}
.frame(width: 144, height: 144)
.background(Color(UIColor.secondarySystemBackground))
.cornerRadius(144)
VStack(spacing: 16) {
Button(icon: "tv")
Button(icon: "magnifyingglass")
}
}
}
.frame(width: 330)
}
}
struct Button: View {
var icon: String
var body: some View {
VStack {
Image(systemName: icon)
}
.frame(width: 64, height: 64)
.background(Color(UIColor.secondarySystemBackground))
.cornerRadius(32)
}
}
PlaygroundPage.current.setLiveView(ContentView())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment