Created
June 9, 2020 12:53
-
-
Save arkivanov/3b030504b8ff5a25dc53d024a2c007c2 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 KittenSwiftView: View { | |
| @ObservedObject var proxy: KittenViewProxy | |
| var body: some View { | |
| } | |
| private var content: some View { | |
| let model: KittenViewModel! = self.proxy.model | |
| return Group { | |
| if (model == nil) { | |
| EmptyView() | |
| } else if (model.isError) { | |
| Text("Error loading kittens :-(") | |
| } else { | |
| List { | |
| ForEach(model.imageUrls) { item in | |
| RemoteImage(url: item) | |
| .listRowInsets(EdgeInsets()) | |
| } | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment