Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/piemonte/Twinkle
:sparkles: Twinkle interface elements in Swift
https://github.com/piemonte/Twinkle
animation caemitterlayer ios particles sparkle sparkles swift tvos twinkle
Last synced: 4 days ago
JSON representation
:sparkles: Twinkle interface elements in Swift
- Host: GitHub
- URL: https://github.com/piemonte/Twinkle
- Owner: piemonte
- License: mit
- Created: 2015-02-25T06:24:58.000Z (almost 10 years ago)
- Default Branch: main
- Last Pushed: 2021-03-03T06:41:49.000Z (almost 4 years ago)
- Last Synced: 2024-12-05T23:42:05.563Z (7 days ago)
- Topics: animation, caemitterlayer, ios, particles, sparkle, sparkles, swift, tvos, twinkle
- Language: Swift
- Homepage:
- Size: 455 KB
- Stars: 613
- Watchers: 17
- Forks: 69
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - Twinkle - Swift and easy way to make elements in your iOS and tvOS app twinkle. (UI / Animation)
- awesome-swift - Twinkle - Easy way to make elements in your iOS app twinkle. (Libs / UI)
- awesome-cocoa - Twinkle
- awesome-swift - Twinkle - Easy way to make elements in your iOS app twinkle. (Libs / UI)
- awesome-ios-star - Twinkle - Swift and easy way to make elements in your iOS and tvOS app twinkle. (UI / Animation)
- fucking-awesome-swift - Twinkle - Easy way to make elements in your iOS app twinkle. (Libs / UI)
- awesome-swift-cn - Twinkle - a Swift and easy way to make elements in your iOS app twinkle. (Libs / UI)
- Awesome-Mobile-UI - Twinkle
- awesome-swift - Twinkle - Twinkle iOS/tvOS app elements in Swift ` 📝 a year ago ` (UI [🔝](#readme))
README
![Twinkle](https://raw.github.com/piemonte/twinkle/master/twinkle.gif)
## Twinkle :sparkles:
`Twinkle` is a [Swift](https://developer.apple.com/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](https://github.com/dev-labs-bg/twinkle).
If you like Twinkle, you may also like [Burst](https://github.com/piemonte/Burst).
[![Build Status](https://travis-ci.com/piemonte/Twinkle.svg?branch=master)](https://travis-ci.com/piemonte/Twinkle) [![Pod Version](https://img.shields.io/cocoapods/v/Twinkle.svg?style=flat)](http://cocoadocs.org/docsets/Twinkle/) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![Swift Version](https://img.shields.io/badge/language-swift%205.0-brightgreen.svg)](https://developer.apple.com/swift) [![GitHub license](https://img.shields.io/badge/license-MIT-lightgrey.svg)](https://github.com/piemonte/Twinkle/blob/master/LICENSE)
Need a different version of Swift?
* `5.0` - Target your Podfile to the latest release or master
* `4.2` - Target your Podfile to the `swift4.2` branch# Quick Start
`Twinkle` is available and recommended for installation using the Cocoa dependency manager [CocoaPods](http://cocoapods.org/). You can also simply copy the `Twinkle.swift` file into your Xcode project.
```ruby
# CocoaPods
pod "Twinkle", "~> 0.5.0"# Carthage
github "piemonte/Twinkle" ~> 0.5.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.
``` Swift
import Twinkle
`````` Swift
// 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
- Found a bug? Open an [issue](https://github.com/piemonte/twinkle/issues).
- Feature idea? Open an [issue](https://github.com/piemonte/twinkle/issues).
- Want to contribute? Submit a [pull request](https://github.com/piemonte/twinkle/pulls).## Resources
* [Core Animation Reference Collection](https://developer.apple.com/library/ios/documentation/Cocoa/Reference/CoreAnimation_framework/index.html)
* [Swift Evolution](https://github.com/apple/swift-evolution)
* [CAEmitterLayer – NSHipster](https://nshipster.com/caemitterlayer/)
* [Twinkle for Android](https://github.com/dev-labs-bg/twinkle)
* [Burst](https://github.com/piemonte/Burst)
* [Shimmer](https://github.com/facebook/shimmer)
* [Blurry](https://github.com/piemonte/Blurry)## License
Twinkle is available under the MIT license, see the [LICENSE](https://github.com/piemonte/twinkle/blob/master/LICENSE) file for more information.