gekitz / GKContactImage

Creates an avatar image like the iOS7 Contacts.app for a given name

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GKContactImage

Creates an avatar image like the iOS7 Contacts.app for a given name

Install

pod 'GKContactImage'

Usage

You simple use the category method with a given name and the size of the image you want to create.

self.bigImageView.image = [UIImage imageForName:@"Georg Kitz" size:self.bigImageView.frame.size];

This would create the following image.

Sample

For a more customized image, use the extra category method with more options.

self.bigImageView.image = [UIImage imageForName:@"Georg Kitz" size:self.bigImageView.frame.size backgroundColor:[UIColor blackColor] textColor:[UIColor yellowColor] font:[UIFont systemFontOfSize:18.0]];

Author

Georg Kitz, @gekitz

About

Creates an avatar image like the iOS7 Contacts.app for a given name

License:MIT License


Languages

Language:Objective-C 85.8%Language:Swift 7.7%Language:Ruby 6.5%