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.
To run the example project, clone the repo, and run pod install
from the Example directory first.
JazziconSwift is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'JazziconSwift'
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)
}
}
Chung Tran, bigearsenal@gmail.com
JazziconSwift is available under the MIT license. See the LICENSE file for more info.