Skip to content
Twinkle iOS/tvOS app elements in Swift
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Sources update to swift4.2, xcode10 Sep 13, 2018
Twinkle.xcworkspace
Twinkle update to swift4.2, xcode10 Sep 13, 2018
.gitignore update gitignore Aug 9, 2016
.swift-version
.travis.yml
LICENSE add Twinkle Feb 25, 2015
Package.swift
README.md update to swift4.2, xcode10 Sep 13, 2018
Twinkle.podspec update to swift4.2, xcode10 Sep 13, 2018
twinkle.gif tweak the sample project, add a gif Feb 25, 2015

README.md

Twinkle

Twinkle

Twinkle is a Swift and easy way to make any UIView in your iOS or tvOS app twinkle.

This library creates several CAEmitterLayers and animates them generating a sparkle effect.

A version of Twinkle is also available for Android.

Build Status Pod Version Swift Version GitHub license

Need a different version of Swift?

  • 4.2 - Target your Podfile to the latest release or master
  • 4.0 - Target your Podfile to the swift4.0 branch

Quick Start

Twinkle is available and recommended for installation using the Cocoa dependency manager CocoaPods. You can also simply copy the Twinkle.swift file into your Xcode project.

# CocoaPods
swift_version = "4.2"
pod "Twinkle", "~> 0.4.0"

# Carthage
github "piemonte/Twinkle" ~> 0.4.0

# SwiftPM
let package = Package(
    dependencies: [
        .Package(url: "https://github.com/piemonte/Twinkle", majorVersion: 0)
    ]
)

Usage

The sample project provides an example of how to integrate Twinkle, otherwise you can follow this example.

   import Twinkle
   // using the UIView extension
   let view: UIView = UIView(frame: CGRect(x: 0, y: 0, width: 150, height: 50))
   self.view.addSubview(view)
   view.twinkle()

   // using the class func
   Twinkle.twinkle(myView)

Community

Resources

License

Twinkle is available under the MIT license, see the LICENSE file for more information.

You can’t perform that action at this time.