Created
May 12, 2020 23:57
-
-
Save jordansinger/2a0f8e0d2b38869560bbf98179568f9d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Screen: View { | |
var body: some View { | |
VStack { | |
ForEach(1...4, id: \.self) { _ in | |
HStack { | |
Spacer() | |
VStack { | |
Rectangle().frame(width: 60, height: 60).foregroundColor(Color(UIColor.systemRed)).cornerRadius(16) | |
Text("App").font(.footnote).padding(.top, 2) | |
} | |
Spacer() | |
VStack { | |
Rectangle().frame(width: 60, height: 60).foregroundColor(Color(UIColor.systemOrange)).cornerRadius(16) | |
Text("App").font(.footnote).padding(.top, 2) | |
} | |
Spacer() | |
VStack { | |
Rectangle().frame(width: 60, height: 60).foregroundColor(Color(UIColor.systemYellow)).cornerRadius(16) | |
Text("App").font(.footnote).padding(.top, 2) | |
} | |
Spacer() | |
VStack { | |
Rectangle().frame(width: 60, height: 60).foregroundColor(Color(UIColor.systemGreen)).cornerRadius(16) | |
Text("App").font(.footnote).padding(.top, 2) | |
} | |
Spacer() | |
} | |
}.padding(.top) | |
Spacer() | |
HStack { | |
Rectangle().frame(width: 60, height: 60).foregroundColor(Color(UIColor.systemBlue)).cornerRadius(16) | |
Spacer() | |
Rectangle().frame(width: 60, height: 60).foregroundColor(Color(UIColor.systemIndigo)).cornerRadius(16) | |
Spacer() | |
Rectangle().frame(width: 60, height: 60).foregroundColor(Color(UIColor.systemPurple)).cornerRadius(16) | |
Spacer() | |
Rectangle().frame(width: 60, height: 60).foregroundColor(Color(UIColor.systemPink)).cornerRadius(16) | |
}.padding().background(Color(UIColor.secondarySystemBackground)).cornerRadius(20).padding() | |
} | |
} | |
} | |
PlaygroundPage.current.setLiveView(Screen()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment