Releases: PimCoumans/AnimationPlanner
v1.2.1
Animations in groups are now executed in the order they’re defined
What's Changed
- Perform Group’s animations in defined order by @PimCoumans in #22
Full Changelog: 1.2.0...1.2.1
v1.2.0
Finally: full working sequence stopping!
What's Changed
- Proper stopping by @PimCoumans in #21
Full Changelog: 1.1.1...1.2.0
v1.1.1
Added the option to delay a Sequence performed in an animation group. Simply add the .delayed() method to your Sequence:
AnimationPlanner.group {
Sequence {
// Your sequenced animations
}.delayed(0.25) // Set delay for sequence here
}Full Changelog: v1.1.0...1.1.1
v1.1.0
Swift 5.8 compatibility: ⚠️ Possibly breaking changes
Swift 5.8 changed some type-checking logic around result builders, complicating AnimationPlanner’s ‘clever’ logic of allowing some type of animations for both group and sequence animations. Now the following has been updated
- Sequence and group animation builders now use their own result builder (
@SequenceBuilderand@GroupBuilderrespectively) - The
Loopconvenience struct and its static methodLoop.through()have been removed, with a build error suggesting other approaches - The Swift.Sequence extension function
mapAnimations()is now replaced withmapSequence()andmapGroup(). While not as clearly named, the type-checker now clearly knows what to do. - Usage for
forandfor _ inloops is more encouraged, as the result builder is perfectly capable to handle these.
What's Changed
- Fix for Swift 5.8 by @PimCoumans in #20
Full Changelog: 1.0.0...v1.1.0
v1.0.0 - Prime time!
- Removed any trace of old-style api, everything is result builders moving forward
- Reorganized file structure. Clearer folder and filenames for all protocols and structs.
v0.9.3 - Result builders Phase 2
Warning: [breaking change] The completion parameter has been removed for the
AnimationPlanner.planand.groupmethods. Read on how to set your completion handler
AnimationPlanner now uses the new structs for all animations created through its API. Even the (now deprecated) UIView.animateSteps method results in a sequence animation handled by Animate and its friends.
To keep tabs on running animations, the RunningSequence class can be used. It is returned from the AnimationPlanner.plan and .group methods. RunningSequence shows the current state, all animations added, but also has a .stopAnimations() method to stop the current and cancel queued animations.
Use onComplete(_ handler: (_ finished: Bool) -> Void)) on the returned RunningSequence to perform logic when the sequence completes (or is stopped). Because the class is returned when creating your animation sequence, adding a completion handler can be done just like with a trailing closure:
AnimationPlanner.plan {
// your animations
}.onComplete { finished in
print(“finished!”)
}v0.9.2 - SPM backwards compatibility
Added Package@5.1.swift supporting older swift versions
v0.9.1 - Logo and better readme
Designed a logo for the library, looks so much better now
v0.9.0 - New API
Adding functionality to use result builders to plan your animations, resulting in a cleaner looking experience.
Phase 1 of this change introduces the new AnimationPlanner.plan API that lives alongside the current, or ‘old’ UIView.animateSteps method. Behind the scenes the result builder logic transforms the animations to the current implementation of actually performing these animations.
- Phase 1: New result builder API, lives next to ‘old' API
- Phase 2: Old API uses result builder structs behind the scenes
- Phase 3: Deprecate old API and fully move over to result builder API
v0.8.0
Introducing the extra step where preparations can be performed or side-effects handled (like triggering haptic feedback). More info in the docs and the complex animation in the sample app.