Latest 0.3.0
Homepage https://github.com/julp04/Snowflake
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

About

Make any image fall like a snowflake! ❄️ Add Snowflake to any view layer for a cool animated affect.

Alt text

Setup

view.backgroundColor = #colorLiteral(red: 0.1411764771, green: 0.3960784376, blue: 0.5647059083, alpha: 1)
let flake = #imageLiteral(resourceName: "flake")

let snowflake = Snowflake(view: view, particles: [flake: .white])
self.view.layer.addSublayer(snowflake)

Start

snowflake.start()

Stop

snowflake.stop()

Add multiple particles

let flake = #imageLiteral(resourceName: "flake")
let snap = #imageLiteral(resourceName: "snap")

let redColor = #colorLiteral(red: 0.8078431487, green: 0.02745098062, blue: 0.3333333433, alpha: 1)
let yellowColor = #colorLiteral(red: 0.9607843161, green: 0.7058823705, blue: 0.200000003, alpha: 1)

let flurry = Snowflake(view: view, particles: [flake: redColor , snap:yellowColor ])

Alt text

Change Flake Size

Snowflake size is a scale from 0.0 to 1.0 (1.0 being the size of your original image) Changing the particlSize affects all snowflakes.

//Snowflake that is half its original size
snowflake.particleSizeRange = 0.5

Example

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

Requirements

Installation

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

pod "Snowflake"

Author

julp04, [email protected]

License

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

Latest podspec

{
    "name": "Snowflake",
    "version": "0.3.0",
    "summary": "Let it snow, let it snow, let it snow u2744ufe0f",
    "description": "This is a short description of what this pod will do",
    "homepage": "https://github.com/julp04/Snowflake",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "julp04": "[email protected]"
    },
    "source": {
        "git": "https://github.com/julp04/Snowflake.git",
        "tag": "0.3.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "Snowflake/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This