Latest0.1.5
Homepagehttps://github.com/hadashiA/RippleLayer
LicenseMIT
Platformsios 8.0, requires ARC
FrameworksUIKit
Authors

Version
License
Platform

Overview

Draw splash effect using CGPath.

RippleLayer

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Getting Started

Installation

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

pod "RippleLayer"

Sample Usage

CALayer subclasses, have been RippleLayer to provide
You can be inserted anywhere in the UIView.

class ViewController : UIViewController {
    override func viewDidLayoutSubviews() {
        super.viewDidLayoutSubviews()

        let rippleLayer = RippleLayer(
            size: myView.frame.size,
            numSprings: 320,
            random: true)
        rippleLayer.fillColor = UIColor(red: 204/255, green: 233/255, blue: 249/255, alpha: 1.0).CGColor
        myView.layer.addSublayer(rippleLayer)
   }
}

Make a UIView subclass if necessary.

Advanced Usage

RippleLayer Init(size:numSprings:random:)

nametypedescription
sizeCGFloatIt will be drawn in this size, but sometimes Protrude by the height of the waves
numSpringsCGFlaotWaves, are made with a large amount of Spring. We specify amount.
randomBoolif true, random ripple

RippleLayer rippleAt(i:height:)

Ripple in any position

nametypedescription
iCGFloatRipple x position. Specify the index of spring.
heightCGFlaotRipple height

Author

hadashiA, https://twitter.com/hadashiA

License

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

Latest podspec

{
    "name": "RippleLayer",
    "version": "0.1.5",
    "summary": "Draw splash effect using CGPath.",
    "description": "                        This provide CALayer subclass. Create a 2D wave splash animation.n                        more info at: [https://github.com/hadashiA/RippleLayer](https://github.com/hadashiA/RippleLayer)n",
    "homepage": "https://github.com/hadashiA/RippleLayer",
    "screenshots": "https://raw.githubusercontent.com/hadashiA/RippleLayer/master/sample_default.gif",
    "license": "MIT",
    "authors": {
        "hadashiA": "[email protected]"
    },
    "source": {
        "git": "https://github.com/hadashiA/RippleLayer.git",
        "tag": "0.1.5"
    },
    "social_media_url": "https://twitter.com/hadashiA",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "Sources/**/*",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This