github.com/IOSCommunity/Twinkle

:sparkles: Swift and easy way to make elements in your iOS and tvOS app twinkle



Documentation

Twinkle

Twinkle :sparkles:

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.

Build Status Pod Version

Installation

CocoaPods

Twinkle is available and recommended for installation using the Cocoa dependency manager CocoaPods. Swift is supported as of version 0.36.

To integrate, add the following to your Podfile:

source ‘https://github.com/CocoaPods/Specs.git'
platform :iOS, ‘8.0’
use_frameworks!

pod ‘Twinkle’

Carthage

Installation is also available using the dependency manager Carthage.

To integrate, add the following line to your Cartfile:

github “piemonte/Twinkle” >= 0.0.3

Swift Package Manager

Installation can be done with the Swift Package Manager, add the following in your Package.swift :

import PackageDescription

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

Manual

You can also simply copy the Twinkle.swift file into your Xcode project.

Usage

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

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

Community

Resources

License

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