Skip to content

TonSilver/WavatarSwift

Repository files navigation

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.