Created
July 12, 2020 00:49
-
-
Save jordansinger/9b433a0076adb985cc3ebc4e1ab61eeb to your computer and use it in GitHub Desktop.
This file contains 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 { | |
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