Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 1005 Bytes

README.md

File metadata and controls

53 lines (33 loc) · 1005 Bytes

Animation over screen

AnimationView is written in swift. It is a subclass of UIView and highly customizable.

animation

Installation

To install AnimationView, simply add AnimationView.swift to your project.

Usage

Creating a AnimationView

let animationView = Animation(frame: self.view.bounds)

Set the colors with the .imageColors property or you can use UIColor.randomColor()

animationView.colors = [UIColor.red, UIColor.green, UIColor.blue]

Add the subview

self.view.addSubview(animationView)

Properties

The BirthRate refers to number of emitted objects created every second. Set the birthrate with the .birthRate property. The default birthrate is 2.0

animationView.birthRate = 2.0

To start the animation, use

animationView.startAnimation()

To stop the animation, use

animationView.stopAnimation()