GithubHelp home page GithubHelp logo

holidaythemes's Introduction

HolidayThemes

SwiftUI module library for adding seasons theme animations to your app.

Requirements

  • iOS 13.0+
  • Xcode 12.0+

Installation

Swift Package Manager

The Swift Package Manager is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

File -> Swift Packages -> Add Package Dependency, enter HolidayThemes repo's URL

HolidayThemes URL - https://github.com/yhondri/HolidayThemes

Included Themes

  • Autum
  • Spring
  • Summer
  • Winter

Creating HolidayThemeView

  1. Create a HolidayThemeView passing the frame that it will fill
GeometryReader { proxy in
    HolidayThemeView(frame: proxy.frame(in: .local))
}

You can customize the HolidayThemeView, for example passing a custom image or changing some of the values of the CAEmitterCell. To do this you need to pass an HolidayThemeData an fill the parameters that you want. 2. Customizing the theme with an image

GeometryReader { proxy in
    HolidayThemeView(frame: proxy.frame(in: .local), themeData: HolidayThemeData(particleImage: UIImage(named: "custom_image.png")!))
}
  1. There are a lot of parameters that you can customize
  • particle: Particle
  • particleImage: UIImage?
  • emitterPosition: CGPoint
  • emitterSize: CGSize
  • emitterMode: CAEmitterLayerEmitterMode
  • renderMode: CAEmitterLayerRenderMode
  • birthRate: Float
  • lifetime: Float
  • velocity: CGFloat
  • velocityRange: CGFloat
  • xAcceleration: CGFloat
  • yAcceleration: CGFloat
  • emissionRange: CGFloat
  • spin: CGFloat
  • spinRange: CGFloat
  • scale: CGFloat
  • scaleRange: CGFloat
  • backgroundColor: UIColor

License

MIT

Free Software, Hell Yeah!

The particle images are from:

holidaythemes's People

Contributors

yhondri avatar

Stargazers

Fisher Lee avatar Ungjae Lee avatar Eilgnaw avatar

Watchers

James Cloos avatar  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.