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.
- 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)
}
}
WavatarSwift is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'WavatarSwift'
Anton Serebryakov, serebryakov.anton@gmail.com
WavatarSwift is available under the MIT license. See the LICENSE file for more info.