Git Product home page Git Product logo

snowfalling's Introduction

SnowFalling

Snow Falling in Swift like a LINE for iOS on Dec 25.

Demo

SnowFalling

##Installation

###Cocoapods

The easiest way to get started is to use CocoaPods. Add the following line to your Podfile:

platform :ios, '8.0'
use_frameworks!
# The following is a Library of Swift.
pod 'SnowFalling'

Then, run the following command:

pod install

###Carthage

Carthage is a decentralized dependency manager that automates the process of adding frameworks to your Cocoa application.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate MediumMenu into your Xcode project using Carthage, specify it in your Cartfile:

github "pixyzehn/SnowFalling"

Run carthage update.

$ carthage update

###Other

Add the SnowFalling (including SnowFallingView.swift) folder into your project.


Default values are as follows.

let kDefaultFlakeFileName               = "snowflake"
let kDefaultFlakesCount                 = 200
let kDefaultFlakeWidth: Float           = 40.0
let kDefaultFlakeHeight: Float          = 46.0
let kDefaultMinimumSize: Float          = 0.4
let kDefaultMaximumSize: Float          = 0.8
let kDefaultAnimationDurationMin: Float = 6.0
let kDefaultAnimationDurationMax: Float = 12.0

According to need, you can adjust other parameter.

sfv = SnowFallingView(frame: CGRectMake(0, 0, view.frame.size.width * 2, view.frame.size.height * 2))
sfv?.flakeFileName        = "snowflake"
sfv?.flakesCount          = 100  // Default is 100.
sfv?.flakeWidth           = 40.0 // Default is 40.0
sfv?.flakeHeight          = 46.0 // Default is 46.0
sfv?.flakeMinimumSize     = 0.6  // Default is 0.4
sfv?.flakeMaximumSize     = 0.8  // Default is 0.8
sfv?.animationDurationMin = 6.0  // Default is 6.0
sfv?.animationDurationMax = 12.0 // Default is 12.0
view.addSubview(sfv!)

See SnowFalling-Sample project for more information.

Description

In demo, If you try to tap 3 times(that is triple tap), you can change the status whether snow is falling or not.

I think you cannot see a snowfall for a long time in Tokyo:-c

Licence

MIT

Author

pixyzehn

snowfalling's People

Watchers

James Cloos avatar OZ avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.