Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic SwiftUI support #446

Closed
wants to merge 2 commits into from
Closed

Basic SwiftUI support #446

wants to merge 2 commits into from

Conversation

alexdremov
Copy link

Issue Link πŸ”—

#430

Goals ⚽

  • Implement basic SwiftUI view for images lazy download
  • Documentation

Implementation Details 🚧

  • Created LazyImage view that loads image from URL and displays placeholder while loading it
  • For optimisation and elegant LazyImage instantiation LazyImageDownloader is created

Looking forward to your comments and advices!
Really wanted to make this beautiful framework to support SwiftUI

@jshier
Copy link
Contributor

jshier commented Jul 5, 2021

Thanks for the PR! However, there are a number of improvements that need to be made before we can accept it.

First, it should offer an API surface as similar as possible to the newly added AsyncImage. Ideally users would just need to change the type of the view to migrate between the types.

Second, it needs to include API that allows users to progressively customize the underlying image loading behavior. This would start with simply loading a URL like AsyncImage to being able to take a full ImageDownloader instance.

Third, it should not use AnyView but instead embrace generics to allow the placeholder to be fully defined by a ViewBuilder.

@jshier jshier self-assigned this Jul 5, 2021
@alexdremov
Copy link
Author

Thanks for the reply!

I'll try to implement what you requested and will notify when it's ready

@jshier jshier mentioned this pull request Dec 3, 2021
@rr-james-hickman
Copy link

@Alexroar any update on this? Hoping for some native SwiftUI support so we can utilize this library in our app.

@alexdremov
Copy link
Author

@Alexroar any update on this? Hoping for some native SwiftUI support so we can utilize this library in our app.

No, have not worked on that one. Found side library for lazy images

@alexdremov alexdremov closed this by deleting the head repository May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants