Created
June 9, 2020 11:27
-
-
Save archieedwards/ef779844ad4a36546efdaf159efb40ba to your computer and use it in GitHub Desktop.
a view to simulate common sub category views..
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
struct MediaContentView: View { | |
var colours : [Color] = [.red, .orange, .green, .pink, .purple, .yellow] | |
var body: some View { | |
ScrollView(.vertical, showsIndicators: true){ | |
ForEach(0..<10) {_ in | |
HStack{ | |
Rectangle() | |
.frame(width: UIScreen.main.bounds.size.width/6 , height: UIScreen.main.bounds.size.height/12) | |
.foregroundColor(self.colours[Int.random(in: 0 ... 5 )]) | |
VStack(alignment: .leading){ | |
Text("Insert Media").font(.headline).fixedSize(horizontal: true, vertical: false) | |
Text("by Spotify").font(.footnote).bold().foregroundColor(.secondary).fixedSize(horizontal: true, vertical: false) | |
} | |
Spacer() | |
} | |
} | |
}.padding(.leading) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment