Skip to content

Library to generate the user avatar placeholder image (iOS)

License

Notifications You must be signed in to change notification settings

bbqsrc/ITDAvatarPlaceholder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ITDAvatarPlaceholder

[![CI Status](http://img.shields.io/travis/Igor Kurylenko/ITDAvatarPlaceholder.svg?style=flat)](https://travis-ci.org/Igor Kurylenko/ITDAvatarPlaceholder) Version License Platform

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, igorkurylenko@gmail.com

License

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

About

Library to generate the user avatar placeholder image (iOS)

Resources

License

Stars

Watchers

Forks

Packages

No packages published