Skip to content

impul/AvatarHashView

Repository files navigation

Build Status Badge w/ Version Badge w/ Platform Badge w/ Licence

AvatarHashView

Create user avatars without storing. Simple and easy to use.

Features

  • Create user avatar
  • Store avatar to UIImage

Installation

CocoaPods

To integrate AvatarHashView into your Xcode project using CocoaPods, specify it in your Podfile:

pod 'AvatarHashView'

Carthage

To include AvatarHashView using Carthage, simply add this in your Cartfile:

github "impul/AvatarHashView"

Communication

  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

How to use

First of all you can review Example target. You can use AvatarHashView by setting UIView class:

@IBOutlet weak var avatarView: AvatarHashView!

...

avatarView.setUser(hash: "userId")

You also can use it directly in code

let avatar = AvatarHashView(hash: "userId", frame: avatarFrame)
view.addSubview(avatar)

Store avatar to UIImage

let image = avatar.image

License

AvatarHashView is released under the MIT License.

About

Create user avatars without storing on device

Resources

License

Stars

Watchers

Forks

Packages

No packages published