Skip to content

Instantly share code, notes, and snippets.

@rudrankriyam
Created June 23, 2020 06:45
Show Gist options
  • Select an option

  • Save rudrankriyam/6a50b3091664abfb42a4b64d1c458dcc to your computer and use it in GitHub Desktop.

Select an option

Save rudrankriyam/6a50b3091664abfb42a4b64d1c458dcc to your computer and use it in GitHub Desktop.
struct VerticalGrid: View {
var columns: [GridItem] =
Array(repeating: .init(.flexible()), count: 2)
var body: some View {
NavigationView {
ScrollView(.vertical) {
LazyVGrid(columns: columns) {
ForEach((1...18), id: \.self) { number in
ImageView(number: number)
}
}
}
.navigationTitle("Landscapes")
}
.navigationViewStyle(StackNavigationViewStyle())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment