Skip to content

rimh/RippleTransition

Repository files navigation

RippleTransition

Version License Platform

A simple transition with native ripple effect which is a combination between ripple and fade-out effect.

Requirement

Xcode 9, Swift 4, iOS 8 or above

Demo

ripple

Installation

RippleTransition is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'RippleTransition'

Usage

First, you need to import the module.

import RippleTransition
class ViewController: UIViewController, UIViewControllerTransitioningDelegate {

    let transition = RippleTransition()

    func animationController(forPresented presented: UIViewController, presenting: UIViewController, source: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        return self.transition
    }
    
    func animationController(forDismissed dismissed: UIViewController) -> UIViewControllerAnimatedTransitioning? {
        return self.transition
    }
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        let controller = segue.destination
        controller.transitioningDelegate = self
    }
}

Custom animation duration by

transition.transitionTimeInterval = 1.0

License

RippleTransition is available under the MIT license. See the LICENSE file for more info.

About

Combine Ripple Effect and Fade Out to make animation transition

Resources

License

Stars

Watchers

Forks

Packages

No packages published