Last active
June 8, 2019 15:18
-
-
Save dmytro-anokhin/c2b5e68db936c62351b3ea9e92d32452 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
| struct ImageListView : View { | |
| let urls = (300..<325).map { "https://picsum.photos/\($0)" }.map { URL(string: $0)! } | |
| var body: some View { | |
| NavigationView { | |
| List(urls.identified(by: \.self)) { url in | |
| NavigationButton(destination: ImageDetailView(url: url)) { | |
| HStack { | |
| URLImage(url: url) | |
| .frame(minWidth: 100.0, maxWidth: 100.0, minHeight: 100.0, maxHeight: 100.0) | |
| .clipped() | |
| Text("\(url)") | |
| } | |
| } | |
| } | |
| .navigationBarTitle(Text("Images")) | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment