Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import SwiftUI
import PlaygroundSupport
struct Screen: View {
@State var volume = 50.0
var body: some View {
VStack {
Rectangle()
.foregroundColor(Color(UIColor.secondarySystemFill))
.cornerRadius(20)
.frame(height: 320)
Spacer()
HStack {
VStack(alignment: .leading) {
Text("Title")
.font(.title)
.fontWeight(.semibold)
Text("Artist")
.font(.headline)
.foregroundColor(Color(UIColor.systemBlue))
}
Spacer()
}
Spacer()
VStack {
Rectangle()
.frame(height: 3)
.cornerRadius(3)
.foregroundColor(Color(UIColor.secondarySystemFill))
HStack {
Text("0:00")
.font(.caption)
.foregroundColor(Color(UIColor.tertiaryLabel))
Spacer()
Text("4:00")
.font(.caption)
.foregroundColor(Color(UIColor.tertiaryLabel))
}
}
Spacer()
HStack {
Spacer()
Image(systemName: "backward.fill")
.font(.system(size: 32))
Spacer()
Image(systemName: "play.fill")
.font(.system(size: 56))
Spacer()
Image(systemName: "forward.fill")
.font(.system(size: 32))
Spacer()
}
Spacer()
HStack(spacing: 12) {
Image(systemName: "volume.fill")
Slider(value: $volume, in: 0...100)
Image(systemName: "volume.3.fill")
}
}.padding()
}
}
PlaygroundPage.current.setLiveView(Screen())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment