Skip to content

Instantly share code, notes, and snippets.

@joeyabanks
Last active August 1, 2020 16:19
Show Gist options
  • Save joeyabanks/84bea00a6780e8733925790969658155 to your computer and use it in GitHub Desktop.
Save joeyabanks/84bea00a6780e8733925790969658155 to your computer and use it in GitHub Desktop.
import SwiftUI
import PlaygroundSupport
struct whatsNewRow: View {
var icon: String
var title: String
var description: String
var body: some View {
HStack (spacing: 24) {
VStack {
Image(systemName: icon)
.font(.system(size: 32))
.foregroundColor(Color(UIColor.orange))
.frame(width: 32)
}
VStack (alignment: .leading, spacing: 4) {
Text(title)
.font(.headline)
Text(description)
.font(.callout)
.foregroundColor(Color(UIColor.secondaryLabel))
}
}
}
}
struct Screen: View {
var body: some View {
ZStack {
Color.gray
.edgesIgnoringSafeArea(.all)
VStack {
VStack {
Spacer()
HStack {
Spacer()
Text("Welcome to Your Updated App")
.font(.largeTitle)
.fontWeight(.bold)
.multilineTextAlignment(.center)
Spacer()
}
Spacer()
//What's new items
VStack (alignment: .leading, spacing: 24) {
whatsNewRow(icon: "play.circle.fill", title: "Listen Anytime, Anywhere", description: "Lorem ipsum dolor sit amet, consectetur adipiscing elit.")
whatsNewRow(icon: "music.mic", title: "Powerful Stories", description: "Ut enim ad minim veniam, quis nostrud exercitation ullamco.")
whatsNewRow(icon: "cloud.fill", title: "Peace of Mind", description: "Duis aute irure dolor in occaecat in voluptate.")
}
Spacer()
VStack (spacing: 32) {
VStack (spacing: 16) {
Image(systemName: "person.2.fill")
.font(.system(size: 24))
.foregroundColor(Color(UIColor.orange))
Text("Data on your podcast listening and interactions is collected to improve the service and is not associated with your Apple ID.")
.font(.caption)
.multilineTextAlignment(.center)
.foregroundColor(Color(UIColor.secondaryLabel))
Text("See how your data is managed...")
.font(.caption)
.multilineTextAlignment(.center)
.foregroundColor(Color(UIColor.orange))
}
VStack {
Button(action: {}) {
Text("Continue")
.fontWeight(.semibold)
}
.padding()
.foregroundColor(.white)
.frame(maxWidth: .infinity)
.background(Color(UIColor.orange))
.cornerRadius(14)
}
}
Spacer()
}
}
.padding(20)
.frame(width: 375, height: 812)
.background(Color(UIColor.systemBackground))
.cornerRadius(20)
}
}
}
PlaygroundPage.current.setLiveView(Screen())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment