TonSilver / WavatarSwift

WavatarSwift is a swift implementation of "Wavatar", identical to wavatars from gravatar.com.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WavatarSwift

Version License Platform

Example

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

WavatarSwift.generate(string: string, size: 50)

Also you can generate wavatar in background with completion (in main thread):

WavatarSwift.generate(string: this.string, size: WavatarSwift.maxSize) {
    string, image in
    imageView.image = image
}

Limitation:

  • Image size is limited by 80.

Requirements

  • iOS 8+.
  • Any MD5 implementation. You need use it in WavatarSwiftMD5 protocol extension for class WavatarSwift.
extension WavatarSwift: WavatarSwiftMD5 {
    public class func md5(_ string: String) -> String {
        return MD5(string)
    }
}

Installation

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

pod 'WavatarSwift'

Author

Anton Serebryakov, serebryakov.anton@gmail.com

License

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

About

WavatarSwift is a swift implementation of "Wavatar", identical to wavatars from gravatar.com.

License:MIT License


Languages

Language:Swift 68.0%Language:Shell 24.5%Language:Ruby 4.2%Language:Objective-C 3.2%