Skip to content

Ripple Effects for iOS. Inspired from Material Design.

License

Notifications You must be signed in to change notification settings

mbarashkov/RippleAnimation

 
 

Repository files navigation

RippleAnimation

Google Material Design Ripple Effects for Swift project. This project is inspired from Android Material Design Ripple Effects.

Carthage compatible

Features

  • Easy way to use Ripple Effects.
  • Call rippleAnimate to your UIView instances with RippleConfiguration.
  • rippleAnimate is UIView extension.

Usage

First, you should import RippleAnimation module.

import RippleAnimation

And now, you can call rippleAnimate with UIView.RippleConfiguration instance.

@IBAction func pressed(sender: UIButton) {
    let config = UIView.RippleConfiguration(color: UIColor.alizarin())
    sender.rippleAnimate(with: config, completionHandler: {
        print("ripple!!")
    })
}

You can use rippleAnimate with more detail parameters with RippleConfiguration just like below.

@IBAction func pressed(sender: UIButton) {
    var config = UIView.RippleConfiguration(color: UIColor.alizarin())
    config.clipsToBounds = true
    config.scaleAnimateDuration = 0.3
    config.fadeAnimateDuration = 0.1
    sender.rippleAnimate(with: config, completionHandler: {
        print("ripple!!")
    })
}

More details is written in Demo project.

Runtime Requirements

  • iOS9.3 or later
  • Xcode8 - Swift3

Installation

CocoaPods

To install RippleAnimation with CocoaPods, add the following lines in your Podfile and run pod install.

source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '9.0'
use_frameworks!
pod ‘RippleAnimation’, ‘0.3

Carthage

To Install RippleAnimation with Carthage, write github "mnat44/RippleAnimation" in your Cartfile and run carthage update.

License

RippleAnimation is released under the MIT license. Go read the LICENSE file for more information.

About

Ripple Effects for iOS. Inspired from Material Design.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 82.2%
  • Ruby 10.8%
  • Objective-C 7.0%