piemonte/Twinkle
piemonte/Twinkle has 616 GitHub stars and 69 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-19 23:45 UTC. Last push 2026-01-21.
Gemessener Sternzuwachs
- in 24h
- 0
- in 7 days
- Verlauf wird gesammelt
- in 15 days
- Verlauf wird gesammelt
- in 1 month
- Verlauf wird gesammelt
Nettoänderungen in überlappenden Zeiträumen, keine Tagessummen. Fehlende Messwerte bleiben leer. Sterne zeigen Interesse, nicht Qualität.
Über uns
:sparkles: Twinkle interface elements in Swift
Kreativität und MedienREADME.md
Original
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.
A version of Twinkle is also available for Android.
If you like Twinkle, you may also like Burst.
Requirements
- iOS 15.0+ / tvOS 15.0+
- Xcode 15.0+
- Swift 6.0+
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
pod "Twinkle", "~> 0.7.0"
# SwiftPM
let package = Package(
dependencies: [
.package(url: "https://github.com/piemonte/Twinkle", from: "0.7.0")
]
)
Usage
The sample project provides an example of how to integrate Twinkle, otherwise you can follow this example.
import Twinkle
// Basic usage with UIView extension
let view = UIView(frame: CGRect(x: 0, y: 0, width: 150, height: 50))
self.view.addSubview(view)
view.twinkle()
// With custom configuration
var config = Twinkle.Configuration()
config.minCount = 10
config.maxCount = 20
config.birthRate = 12
config.scale = 0.8
view.twinkle(configuration: config)
// With custom image
let customImage = UIImage(named: "star")
view.twinkle(image: customImage)
// Using the static method
Twinkle.twinkle(myView, configuration: config)
Community
- Found a bug? Open an issue.
- Feature idea? Open an issue.
- Want to contribute? Submit a pull request.
Resources
- Core Animation Reference Collection
- Swift Evolution
- CAEmitterLayer – NSHipster
- Twinkle for Android
- Burst
- Shimmer
- Blurry
License
Twinkle is available under the MIT license, see the LICENSE file for more information.