Add a visually striking dismiss animation to any iOS view controller with minimal code changes
Customize the fragment size and duration to create either a fine-dust or chunky-shatter look
Study OpenGL-based iOS animation as an alternative approach to standard UIKit transitions
Requires iOS 8.0 or later, add one line to your Podfile and run pod install to get started.
StarWars.iOS is a Swift library for iOS that adds a visual transition effect to your app. When a screen is dismissed, the animation breaks it apart into a shower of tiny fragments that scatter and disappear, giving the impression that the view is crumbling into dust. The effect is rendered using OpenGL rather than the standard UIKit animation system, which is how the library achieves the particle-level detail. To add it to an iOS project, you include it as a CocoaPods dependency with one line in your Podfile. In code, you hook into the iOS transition system by implementing a delegate object that returns the library's animator when a view controller is being dismissed. Once that is wired up, the animation runs automatically whenever the screen is closed. The library exposes two settings you can adjust: the duration of the animation and the size of the individual sprite pieces the screen breaks into. Smaller sprites produce a finer, more granular crumble effect, while larger ones give a chunkier look. The defaults work out of the box without any configuration. The library requires iOS 8.0 or later and was built with Swift. The version history tracks updates through Swift 2, 3, 4, and 5 compatibility releases. It is distributed under the MIT license and was created by Yalantis, a mobile design and development studio. A blog post on the Yalantis website documents the technical choices behind the animation, comparing UIKit animations, UIDynamics, and OpenGL as approaches for this kind of visual effect.
← yalantis on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.