Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Tags: kaishin/Gifu

Tags

v4.0.1

Toggle v4.0.1's commit message
Fix podspec: remove Swift 6.2 and submodules reference

v4.0.0

Toggle v4.0.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Migrate project to Swift 6 (#204)

- Bump minimum iOS version to 14.0
- Update GitHub Actions workflow to use Xcode 15.4 and 16.2.

v3.5.1

Toggle v3.5.1's commit message

v3.5.0

Toggle v3.5.0's commit message

v3.4.1

Toggle v3.4.1's commit message

v3.4

Toggle v3.4's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
Add `loopBlock` callback for when a loop is finished (#183)

It's called every time the last frame is shown, on every loop. This is
different to `animationBlock` which is only called after all the loops
have finished (and never for infinite loops).

Why? I have a use case where I'm playing a GIF in an infinite loop but I
want to know when it has been shown at least once (first loop has been
completed).

Currently, there's no good way to satisfy this use case. One way is to
read `loopDuration` and then schedule a timer to fire when that time has
elapsed, which is roughly when one loop has happened. But in addition to
being inaccurate, it's very fiddly because the timer has to be
paused/unpaused if the GIF is paused/unpaused.

Another way you might think would work is to use `loopCount: 1` instead
and then use `animationBlock`. Then there just start playback again for
the rest of the loops. The problem with that is that there's no way to
restart without preparing the frames again AFAICT.

With this new callback, it's very straightforward.

v3.3.1

Toggle v3.3.1's commit message

v3.3

Toggle v3.3's commit message

v3.3.0

Toggle v3.3.0's commit message

v3.2.2

Toggle v3.2.2's commit message
Bump version to 3.2.2