A Swifty wrapper over UIViewPropertyAnimator for creating powerful, referenceable, and interactive animations in iOS.
Dance is a Swift framework that wraps Apple's UIViewPropertyAnimator to simplify creating and controlling animations in iOS apps. It provides a clean, chainable API for building interactive animations that can be paused, reversed, scrubbed, and finished programmatically. It solves the problem of managing complex animation states with an intuitive, view-attached approach.
iOS developers building apps with interactive animations, particularly those targeting iOS 10+ who want fine-grained control over animation playback and timing.
Developers choose Dance because it offers a Swifty, forgiving API over UIViewPropertyAnimator that reduces boilerplate, enables powerful interactive animations, and provides better debugging and state management than traditional UIView animation methods.
Swifty wrapper over UIViewPropertyAnimator
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Animations are attached directly to UIView instances, allowing control methods like .pause() or .reverse() from anywhere the view is accessible, as shown in the README's examples.
Provides simple methods to pause, reverse, scrub through progress, or finish animations early, enabling responsive user interactions without boilerplate code.
Supports UIKit timing curves, spring animations, custom cubic Bézier curves, and UITimingCurveProvider, offering precise control over animation timing as detailed in the usage section.
Animates Auto Layout constraint changes by calling layoutIfNeeded() on specific views, avoiding the performance hit of laying out all subviews, as explained in the README.
Limits compatibility to newer iOS versions, excluding apps that need to support older devices or versions, which is explicitly stated in the README's compatibility section.
Does not integrate with SwiftUI, forcing developers to use UIKit views or find workarounds for modern SwiftUI-based projects, a significant limitation in today's iOS development.
As noted in the README, Dance is 'in its infancy,' which might mean fewer features, potential bugs, and less community support compared to mature animation libraries.