8000 GitHub - bigearsenal/JazziconSwift: Jazzy Identicons written in pure swift
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

bigearsenal/JazziconSwift

Repository files navigation

JazziconSwift

Jazzy Identicons written in pure swift, rewritten from jazzicon-js using swift.

Say goodbye to boring blocky identicons that look like they came out of the 70s, and replace them with jazzy, colorful collages that more likely came out of the 80's.

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

JazziconSwift is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'JazziconSwift'

Usage

iOS

let imageView = JazziconImageView(frame: ..., seed: 1324)

// or draw by yourself in draw(rect:) method
open class CustomView: UIView {
    open override func draw(_ rect: CGRect) {
        super.draw(rect)
        
        guard let context = UIGraphicsGetCurrentContext() else {
            return
        }
        
        let jazzicon = Jazzicon(seed: seed)
        jazzicon.draw(with: context, in: rect)
    }
}

Author

Chung Tran, bigearsenal@gmail.com

License

JazziconSwift is available under the MIT license. See the LICENSE file for more info.

0