Skip to content

Instantly share code, notes, and snippets.

@keremk
Last active January 6, 2020 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keremk/b00d16ccf18e20ec3aa8c425ba9542df to your computer and use it in GitHub Desktop.
Save keremk/b00d16ccf18e20ec3aa8c425ba9542df to your computer and use it in GitHub Desktop.
#if DEBUG
struct MovieList_Previews: PreviewProvider {
static var previews: some View {
let movies = MovieCollection().fetchMovies()
let selectMovies = [movies[0], movies[2], movies[3]]
return MovieList(movies: selectMovies)
.previewLayout(.sizeThatFits)
.environmentObject(EnvironmentConfig(mode: .PreviewMode))
}
}
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment