Skip to content

A splash loading animation with ripple effect written in Swift.

License

Notifications You must be signed in to change notification settings

ihak/RippleGenerator

Repository files navigation

RippleGenerator

A splash loading animation with ripple effect written in Swift.

alt tag

Usage

Create an instance of HAKRippleGenerator and add it to your view:

let rippleView = HAKRippleGenerator(frame: CGRect(x: 0.0, y: 0.0, width: UIScreen.main.bounds.width, height: 180), duration: 0.4)
rippleView!.backgroundColor = UIColor.clear
self.view.addSubview(rippleView!)

Position the view using center property:

let screenCenter = CGPoint(x: UIScreen.main.bounds.width/2, y: UIScreen.main.bounds.height/2)
rippleView.center = CGPoint.init(x: screenCenter.x, y: screenCenter.y/0.55)

Start animation:

self.rippleView.startAnimating()

Stop animation:

rippleView.stopAnimating()

About

A splash loading animation with ripple effect written in Swift.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages