A Swift library that recreates the iOS Apple Music card-like transition for modal view controllers.
DeckTransition is a Swift library that recreates the iOS Apple Music and iMessage card-like transition for presenting modal view controllers. It solves the need for custom, native-feeling modal animations in iOS apps by providing a smooth, swipe-dismissible card presentation. The library handles scroll view detection and snapshot management to ensure compatibility and performance.
iOS developers building apps that require custom modal presentations with native iOS transition aesthetics, particularly those targeting iOS 9 and later with Swift 5.
Developers choose DeckTransition for its accurate replication of Apple's card transition, ease of integration via storyboards or code, and built-in swipe-to-dismiss gestures. Its automatic scroll view detection and snapshot-based approach reduce implementation complexity while maintaining a polished user experience.
A library to recreate the iOS Apple Music now playing transition
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Accurately replicates the card transition from iOS 10's Apple Music and iMessage, ensuring a seamless user experience that feels integrated with the system, as stated in the README's philosophy.
Supports custom storyboard segues with minimal setup—just set the segue class to DeckSegue—making it accessible for visual development workflows.
Uses internal heuristics to automatically identify the correct UIScrollView for swipe-to-dismiss gestures, reducing manual configuration for most cases, as detailed in the UIScrollView detection section.
Provides a native-like swipe-to-dismiss gesture that activates when the modal's scroll view is at the top, with an opt-out option for flexibility, enhancing interactivity.
Relies on snapshots for performance and safe area compatibility, but manual updates are expensive and only recommended for infrequent changes like theme updates, as warned in the snapshots section.
The automatic UIScrollView detection may fail in edge cases, requiring protocol conformance and additional code, which adds complexity for non-standard layouts, as admitted in the documentation.
Only supports iOS 9 and later, excluding legacy applications still running on older iOS versions, as specified in the requirements.