GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - pushd/SwiftConfettiView: Mirror of theoriginalbit/SwiftConfettiView (deleted upstream), MIT

BranchesTags
Open more actions menu

Latest commit

 

History

18 Commits
18 Commits

Folders and files

NameName
Last commit message
Last commit date
Example
Example
 
 
Sources/SwiftConfettiView
Sources/SwiftConfettiView
 
 
.gitignore
.gitignore
 
 
.swift-version
.swift-version
 
 
LICENSE
LICENSE
 
 
Package.swift
Package.swift
 
 
README.md
README.md
 
 
SwiftConfettiView.podspec
SwiftConfettiView.podspec
 
 
_Pods.xcodeproj
_Pods.xcodeproj
 
 

Repository files navigation

Swift Confetti View Tweet

Related

This project is an updated version of ugurethemaydin/SwiftConfettiView which was a clone of sudeepag/SAConfettiView.

Swift Confetti View! Who doesn't like confetti?

language CI Status License Platform

confetti

It's raining confetti! SwiftConfettiView is the easiest way to add fun, multi-colored confetti to your application and make users feel rewarded. Written in Swift, SwiftConfettiView is a subclass of UIView and is highly customizable. From various types and colors of confetti to different levels of intensity, you can make the confetti as fancy as you want.

To run the example project, clone the repo, and open the Example directory in Xcode 12 or higher.

Installation

Swift Package Manager

Note: Instructions below are for using SwiftPM without the Xcode UI. It's the easiest to go to your Project Settings -> Swift Packages and add Swift Confetti View from there.

To integrate using Apple's Swift package manager, without Xcode integration, add the following as a dependency to your Package.swift:

.package(url: "https://github.com/theoriginalbit/SwiftConfettiView.git", .upToNextMajor(from: "0.2.0"))

and then specify "Swift Confetti View" as a dependency of the Target in which you wish to use Swift Confetti View.

Manual Installation

To manually install SwiftConfettiView, simply add SwiftConfettiView.swift to your project. Make sure you copy the assets over into your bundle too!

Usage

Creating a SwiftConfettiView is the same as creating a UIView:

let confettiView = SwiftConfettiView(frame: self.view.bounds)

Don't forget to add the subview!

self.view.addSubview(confettiView)

Types

Pick one of the preconfigured types of confetti with the .type property, or create your own by providing a custom image. This property defaults to the .Confetti type.

.confetti

confetti

confettiView.type = .confetti
.triangle

triangle

confettiView.type = .triangle
.star

star

confettiView.type = .star
.diamond

diamond

confettiView.type = .diamond
.image

image

confettiView.type = .image(UIImage(named: "smiley")!)

Colors

Set the colors of the confetti with the .colors property. This property has a default value of multiple colors.

confettiView.colors = [.red, .green, .blue]

Intensity

The intensity refers to how many particles are generated and how quickly they fall. Set the intensity of the confetti with the .intensity property by passing in a value between 0 and 1. The default intensity is 0.5.

confettiView.intensity = 0.75

Starting

To start the confetti, use

confettiView.startConfetti()

Stopping

To stop the confetti, use

confettiView.stopConfetti()

Status

To check if the confetti is active and currently being displayed, use

confettiView.isActive

Returns true if it is being displayed, and false if it is not.

About

Mirror of theoriginalbit/SwiftConfettiView (deleted upstream), MIT

Resources

Readme
MIT license
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.