ITDAvatarPlaceholder 0.1.0

ITDAvatarPlaceholder 0.1.0

TestsTested
LangLanguage SwiftSwift
License MIT
ReleasedLast Release Apr 2016
SPMSupports SPM

Maintained by Igor Kurylenko.



ITDAvatarPlaceholder

Generates an avatar placeholder image with first letters of the provided full user name in the center.

screenshot

This library uses Chameleon (Flat Color Framework for iOS) for a background color generation. Moreover a color of the background is computed from a hash of the provided user name.

Usage

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

To create the 256x256 placeholder image:

let avatarPlaceholderImage = UIImage.createAvatarPlaceholder(
        userFullName: "Erlich Bachman", placeholderSize: CGSizeMake(256, 256))

Installation

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

pod "ITDAvatarPlaceholder"

Author

Igor Kurylenko, [email protected]

License

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