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

SwiftUI animated image view #1705

Merged
merged 10 commits into from
May 9, 2021
Merged

SwiftUI animated image view #1705

merged 10 commits into from
May 9, 2021

Conversation

onevcat
Copy link
Owner

@onevcat onevcat commented May 9, 2021

No description provided.

@onevcat onevcat merged commit 2277d9e into master May 9, 2021
@onevcat onevcat deleted the Binlogo-feature/animated-view branch May 9, 2021 05:18
@wilg
Copy link

wilg commented May 11, 2021

In my case, I don't know if the image is animated ahead of time. Is there a way Kingfisher could automatically detect that?

@onevcat
Copy link
Owner Author

onevcat commented May 14, 2021

@wilg It is not possible in current Kingfisher's implementation now. You have to determine which type it is before you can create a correct type of view.

I remembered there is a library which can determine the file type from a URL, by only loading the first few bytes. But I cannot find it now. If you use that, it should be quite quick to know the format of a remote file and then build the view with correct type.

If you cannot find it either, maybe it could be a good idea to build one, or even embed this feature in Kingfisher. If you'd like, you can open an issue so I can track it as my backlog.

Thanks!

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