This repository provides a SnowEffectViewBuilder to display snow effect.
It can create a UIView by calling:
func createView(type: SnowType, size: CGSize) -> CAEmitterLayeror create a CALayer by calling:
func createLayer(type: SnowType, size: CGSize) -> CAEmitterLayerand 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)
}Merry Christmas ☃️☃️☃️☃️☃️☃️.
To run the example project, clone the repo, and run pod install from the Example directory first.
SnowEffectViewBuilder is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SnowEffectViewBuilder'DADA, [email protected]
SnowEffectViewBuilder is available under the MIT license. See the LICENSE file for more info.
