nicer list

This commit is contained in:
Jens Timmerman 2020-09-28 02:06:03 +02:00
parent ad2d485da9
commit 6ceee7a50d
1 changed files with 11 additions and 10 deletions

View File

@ -20,7 +20,7 @@ struct ContentView: View {
AsyncImage(url: show.imageURL,placeholder: { AsyncImage(url: show.imageURL,placeholder: {
//Image(name: "loading") //Image(name: "loading")
Text("Loading...") Text("Loading...")
}, image:{Image(uiImage:$0).resizable()}).frame(width: 200, height:200) }, image:{Image(uiImage:$0).resizable()}).frame(width: 300, height:300)
Text(show.title) Text(show.title)
} }
} }
@ -49,15 +49,16 @@ struct SeasonView: View {
NavigationView(){ NavigationView(){
List(season.getEpisodes(), id:\.self){ episode in List(season.getEpisodes(), id:\.self){ episode in
NavigationLink(destination: VideoView(episode: episode)){ NavigationLink(destination: VideoView(episode: episode)){
VStack{ HStack{
Text(episode.name) AsyncImage(url: episode.imageURL,placeholder: {
AsyncImage(url: episode.imageURL,placeholder: { //Image(name: "loading")
//Image(name: "loading") Text("Loading...")
Text("Loading...") },image:{Image(uiImage:$0).resizable()}).frame(width: 300, height: 300)
},image:{Image(uiImage:$0).resizable()}).frame(width: 300, height: 300) Text(episode.name)
}
} }
} }
}
} }
} }
} }
@ -78,8 +79,8 @@ struct VideoView: View {
} }
struct ContentView_Previews: PreviewProvider { struct ContentView_Previews: PreviewProvider {
static var previews: some View { static var previews: some View {
//SeasonView(season: VRTNu().shows[0].getSeasons()[0]) SeasonView(season: VRTNu().shows[0].getSeasons()[0])
ContentView() //ContentView()
} }
} }