Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 1.73 KB

README.md

File metadata and controls

59 lines (39 loc) · 1.73 KB

SnowEffectViewBuilder

This repository provides a SnowEffectViewBuilder to display snow effect.

It can create a UIView by calling:

func createView(type: SnowType, size: CGSize) -> CAEmitterLayer

or create a CALayer by calling:

func createLayer(type: SnowType, size: CGSize) -> CAEmitterLayer

and it provides three ways to setup the snow particle.

  • Use Emoji with font size
  • Draw circle with size and color
  • Use custom UIImage
public enum SnowEffectViewBuilder.SnowType {
	case emoji(string: String, fontSize: CGFloat)
	case circle(size: CGSize, color: UIColor)
	case customImage(image: UIImage)
}

screenshot

Merry Christmas ☃️☃️☃️☃️☃️☃️.

Example

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

Installation

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

pod 'SnowEffectViewBuilder'

Author

DADA, nalydadad@gmail.com

License

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