-
Notifications
You must be signed in to change notification settings - Fork 127
/
Copy pathContentView.swift
44 lines (38 loc) · 1.64 KB
/
ContentView.swift
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// Copyright © 2019 Paolo Leonardi.
//
// Licensed under the MIT license. See the LICENSE file for more info.
//
import SwiftUI
struct ContentView: View {
@State var selectedTab = 0
var body: some View {
List() {
NavigationLink(destination: RectanglesGrid(rectangles: .constant(Generator.Rectangles.random(editMode: .addRemove)),
settings: .constant(Settings.default(for: .rectangles(.addRemove))))
) {
Text("Rectangles \n[vertical scroll]")
}
NavigationLink(destination: RectanglesGrid(rectangles: .constant(Generator.Rectangles.random(editMode: .addRemove)),
settings: .constant(Settings.default(for: .rectangles(.addRemove), scrollDirection: .horizontal)))
) {
Text("Rectangles \n[horizontal scroll]")
}
NavigationLink(destination: ImagesGrid(images: .constant(Generator.Images.random()),
settings: .constant(Settings.default(for: .images)))
) {
Text("Images \n[vertical scroll]")
}
NavigationLink(destination: ImagesGrid(images: .constant(Generator.Images.random()),
settings: .constant(Settings.default(for: .images, scrollDirection: .horizontal)))
) {
Text("Images \n[horizontal scroll]")
}
}
}
}
struct ContainerView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}