Swiftpack.co - gekitz/GKContactImage as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by gekitz.
gekitz/GKContactImage 0.0.4
Creates an avatar image like the iOS7 Contacts.app for a given name
⭐️ 56
🕓 2 years ago
.package(url: "https://github.com/gekitz/GKContactImage.git", from: "0.0.4")

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

GitHub

link
Stars: 56
Last commit: 2 years ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics