Skip to content
프로젝트

소개

:sparkles: Swift로 구현한 Twinkle 인터페이스 요소

디자인 및 미디어

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
0
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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.

A version of Twinkle is also available for Android.

If you like Twinkle, you may also like Burst.

Swift Version Platform SPM Compatible Pod Version GitHub license

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

Resources

License

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

관련 프로젝트 살펴보기

불러오는 중…