Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/efremidze/Shiny
Iridescent Effect View (inspired by Apple Pay Cash) β¨
https://github.com/efremidze/Shiny
animation apple apple-pay carthage cash cocoapods hologram holographic ios motion pay shiny swift
Last synced: 3 days ago
JSON representation
Iridescent Effect View (inspired by Apple Pay Cash) β¨
- Host: GitHub
- URL: https://github.com/efremidze/Shiny
- Owner: efremidze
- License: mit
- Created: 2017-12-09T03:14:14.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-11-20T08:16:51.000Z (about 1 year ago)
- Last Synced: 2024-12-01T04:15:35.489Z (11 days ago)
- Topics: animation, apple, apple-pay, carthage, cash, cocoapods, hologram, holographic, ios, motion, pay, shiny, swift
- Language: Swift
- Homepage:
- Size: 1.25 MB
- Stars: 810
- Watchers: 19
- Forks: 41
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-swift - Shiny - Iridescent Effect View (inspired by Apple Pay Cash). (Libs / UI)
- awesome-cocoa - Shiny
- awesome-swift - Shiny - Iridescent Effect View (inspired by Apple Pay Cash). (Libs / UI)
- awesome-ios-star - Shiny - Iridescent Effect View (inspired by Apple Pay Cash). (UI / Font)
- fucking-awesome-swift - Shiny - Iridescent Effect View (inspired by Apple Pay Cash). (Libs / UI)
- awesome-ios - Shiny - Iridescent Effect View (inspired by Apple Pay Cash). (UI / Font)
- awesome-swift - Shiny - Iridescent Effect View (inspired by Apple Pay Cash) ` π 2 years ago ` (UI [π](#readme))
README
# Shiny
[![Build Status](https://travis-ci.org/efremidze/Shiny.svg?branch=master)](https://travis-ci.org/efremidze/Shiny)
[![Language](https://img.shields.io/badge/Swift-5-orange.svg?style=flat)](https://swift.org)
[![Version](https://img.shields.io/cocoapods/v/Shiny.svg?style=flat)](http://cocoapods.org/pods/Shiny)
[![License](https://img.shields.io/cocoapods/l/Shiny.svg?style=flat)](http://cocoapods.org/pods/Shiny)
[![Platform](https://img.shields.io/cocoapods/p/Shiny.svg?style=flat)](http://cocoapods.org/pods/Shiny)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)**Shiny** is an iOS library that generates an iridescent effect view matched to the gyroscope, similar to the Apple Pay Cash card in the Wallet app.
```
$ pod try Shiny
```## Requirements
- iOS 9.0+
- Xcode 9.0+
- Swift 5 (Shiny 2.x), Swift 4 (Shiny 1.x)## Usage
Adding `ShinyView` programmatically (supports storyboard/xib too):
```swift
import Shinylet shinyView = ShinyView(frame: CGRect(x: 0, y: 0, width: 320, height: 200))
shinyView.colors = [.gray, .red, .green, .blue, .gray]
shinyView.startUpdates() // necessary
view.addSubview(shinyView)
```You must call `startUpdates()` for the instance to observe motion changes. Calling `stopUpdates()` on the instance will stop motion updates.
```swift
func startUpdates() // Starts listening to motion updates.
func stopUpdates() // Stops listening to motion updates.
```### Customization
The `ShinyView` exposes several properties to customize the radial gradient used to create the shiny effect:
```swift
var colors: [UIColor] // The color of each gradient stop.
var locations: [CGFloat]? // The location of each gradient stop. The default is `nil`.
var scale: CGFloat // The scale factor of the gradient. The default is `2.0`.
```## Installation
Shiny is available via CocoaPods and Carthage.
### CocoaPods
To install with [CocoaPods](http://cocoapods.org/), simply add this in your `Podfile`:
```ruby
use_frameworks!
pod "Shiny"
```### Carthage
To install with [Carthage](https://github.com/Carthage/Carthage), simply add this in your `Cartfile`:
```ruby
github "efremidze/Shiny"
```## Mentions
- [iOS Dev Weekly 332](http://iosdevweekly.com/issues/332#start)
## Communication
- If you **found a bug**, open an issue.
- If you **have a feature request**, open an issue.
- If you **want to contribute**, submit a pull request.## Apps Using _Shiny_
Feel free to submit a PR if youβre using this library in your apps.
## License
Shiny is available under the MIT license. See the LICENSE file for more info.