https://kotlinlang.org logo
#compose-ios
Title
# compose-ios
b

brandonmcansh

02/21/2024, 6:23 PM
has anyone been able to implement a Gif renderer on iOS?
z

zsmb

02/21/2024, 6:30 PM
Coil supports gifs in general, and the 3.0 alphas have multiplatform support (but they're obviously early). I haven't tried these two things together yet, but I assume they'd work.
thank you color 1
b

brandonmcansh

02/21/2024, 6:39 PM
GIFs are Android only in 3 atm
z

zsmb

02/21/2024, 8:26 PM
Ah, I found the docs about that now, good to know. Unfortunately I don't know of an alternative.
b

brandonmcansh

02/22/2024, 4:20 AM
Was able to get it to work - no cocoapod or 3rd party dependency 🙂 just need to figure out how to map contentMode's
🎉 4
Copy code
val gifView = remember(url) {
        UIImageView().apply {
            launch {
                image = UIImage.gifImageWithURL(url)
            }
        }
    }
d

Dima Avdeev

02/22/2024, 6:42 AM
Good solution!
j

Joel Denke

02/22/2024, 10:01 AM
Nice! 🙂 WOuld love see a PR for Coil and/or Kamel supporting this 🙂
1
b

brandonmcansh

02/23/2024, 2:39 AM
Thanks! 🙏 @Dima Avdeev
@Joel Denke maybe when I get my head out of the weeds on this project :)
l

Luca

03/14/2024, 10:44 AM
Kamel should have support for gifs on the next release: https://github.com/Kamel-Media/Kamel/issues/12#issuecomment-1997137959
👍 1
released in v1.0.0-beta.5
b

brandonmcansh

03/14/2024, 11:46 PM
For iOS too?
l

Luca

03/14/2024, 11:46 PM
Yup everything @brandonmcansh
b

brandonmcansh

03/14/2024, 11:48 PM
Nice
👌 1
23 Views