Last active
September 18, 2019 14:08
-
-
Save ryangittings/badd0d2e312bae064db06aea7c222048 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
struct ContentView: View { | |
var body: some View { | |
List { | |
PosterView() | |
Section(header: Text("Section")) { | |
TestView() | |
} | |
Section(header: Text("Section")) { | |
TestView() | |
} | |
Section(header: Text("Section")) { | |
TestView() | |
} | |
Section(header: Text("Section")) { | |
ForEach(1...20, id: \.self) {_ in | |
Text("test") | |
} | |
} | |
} | |
.edgesIgnoringSafeArea(.top) | |
.listStyle(GroupedListStyle()) | |
} | |
} | |
struct PosterView: View { | |
var body: some View { | |
Image(systemName: "tv.fill") | |
.resizable() | |
.aspectRatio(contentMode: .fit) | |
.frame(height: 600) | |
} | |
} | |
struct TestView: View { | |
var body: some View { | |
ScrollView(.horizontal) { | |
HStack { | |
ForEach(1...20, id: \.self) {_ in | |
Image(systemName: "tv.fill") | |
.frame(width: 160, height: 240) | |
} | |
} | |
} | |
} | |
} | |
struct ContentView_Previews: PreviewProvider { | |
static var previews: some View { | |
ContentView() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment