Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dkalaitzidis/SwiftyAvatar
iOS Swift class to create circular or rounded avatar images
https://github.com/dkalaitzidis/SwiftyAvatar
Last synced: 3 months ago
JSON representation
iOS Swift class to create circular or rounded avatar images
- Host: GitHub
- URL: https://github.com/dkalaitzidis/SwiftyAvatar
- Owner: dkalaitzidis
- License: mit
- Created: 2016-08-04T13:33:20.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-11T11:37:54.000Z (over 6 years ago)
- Last Synced: 2024-04-24T19:01:56.953Z (6 months ago)
- Language: Swift
- Homepage:
- Size: 196 KB
- Stars: 183
- Watchers: 8
- Forks: 19
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ios - SwiftyAvatar - A UiimageView class for creating circular avatar images, IBDesignable to make all changes via storyboard. (Media / Image)
- awesome-ios-star - SwiftyAvatar - A UiimageView class for creating circular avatar images, IBDesignable to make all changes via storyboard. (Media / Image)
README
SwiftyAvatar
===================[![3.0](https://img.shields.io/badge/Swift%203--brightgreen.svg)](https://developer.apple.com/swift/)
[![Apache](https://img.shields.io/hexpm/l/plug.svg)](http://www.apache.org/licenses/LICENSE-2.0)
[![CocoaPods Compatible](https://img.shields.io/badge/Pod-1.0-blue.svg)](https://img.shields.io/badge/Pod-1.0-blue.svg)iOS **Swift 3.0** UIimage class
Create awesome circular avatar images!
--------------------------------------
![enter image description here](http://i.imgur.com/bZFMGGj.png)----------
**IBInspectable** attributes accessible from the identity inspector.- Roundness
- Border width
- Border color
- Background colorYou can see the changes directly on the storyboard!
----------
Installation
-------------**Cocoapods:**
- pod 'SwiftyAvatar', '~> 1.1'
**Manual:**
- drag 'n drop SwiftyAvatar.swift into your project.
----------
How to use
-------------**Storyboard:**
- Select the image you want to use as avatar and change the class to SwiftyAvatar.
**Code:**
- With default initializer
```
let avatar = SwiftyAvatar()
avatar.image = UIImage(named:"yourImage")
```- With your values
```
let avatar = SwiftyAvatar(size: 50,
roundess: 2,
borderWidth: 1,
borderColor: .orange,
background: .black)
avatar.image = UIImage(named: "yourImage")
```----------
Contact & Contribute
-------------- Feel free to contact me with ideas or suggestions at [email protected]
- Fork the project and make your own changes