Open ruby109 opened 3 years ago
Thank you for opening the issue.
I haven't thought about this use case before, but I wonder if Gifu wouldn't be overkill for displaying static GIFs.
I would gladly consider a PR if the changes only minimally affect the API surface. Otherwise I would wait until the next major version since I am expecting some sizable refactors to take place.
If you would like to display a static GIF Image(only 1 frame), the first frame is not added to the image. Also due to it's a static image, it can't be showed by the
startAnimatingGIF()
function.There are two ways to show it, use
GIFAnimatable
'sprepareForAnimation(withGIFData:loopCount:completionHandler:)
or use otherprepareForAnimation
then call theupdateImageIfNeeded()
.I think maybe other function start with
prepareForAnimation
should also add code likeimageContainer.image = UIImage(data: imageData)
or the trick which is mentioned above should be added to the documentation.