https://github.com/andriadze/circlelabel
Short labels with circle backgrounds. Like Androids Contacts and Messages App
https://github.com/andriadze/circlelabel
circlelabel circlularlabel ios label storyboard swift
Last synced: 10 months ago
JSON representation
Short labels with circle backgrounds. Like Androids Contacts and Messages App
- Host: GitHub
- URL: https://github.com/andriadze/circlelabel
- Owner: andriadze
- License: mit
- Created: 2017-09-28T08:20:24.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-09-28T09:40:03.000Z (over 8 years ago)
- Last Synced: 2025-04-18T07:51:45.524Z (about 1 year ago)
- Topics: circlelabel, circlularlabel, ios, label, storyboard, swift
- Language: Swift
- Homepage:
- Size: 55.7 KB
- Stars: 21
- Watchers: 3
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CircleLabel
[](http://cocoapods.org/pods/CircleLabel)
[](http://cocoapods.org/pods/CircleLabel)
[](http://cocoapods.org/pods/CircleLabel)
## Description and Features
Lib automatically creates labels with circular backgrounds(Like in contacts app in Android).
Library is written in swift
```swift
iOS Version >= 8.0
```
It is highly customizable.
It has text based color generator(Same text will always be same color)
It has full Storyboard integration.
## Installation
CircleLabel is available through [CocoaPods](http://cocoapods.org).
To install it, simply add the following line to your Podfile:
```ruby
pod 'CircleLabel'
```
### Manual Installation
Dowload files from lib folder and copy them into your project.
## Usage
CircleLabel extends UIImageView. It has full Storyboard support you will see how it looks directly in Interface Builder.
```swift
import CircleLabel
```
### StoryBoard
Drag UIView to your view and set class to CircleLabel.
You can set parameters directly from Storyboard or Manually from code.

### Parameters
```swift
var circle:CircleLabel
//Set text within circle
circle.text = "From Code"
//This text will be used to generate circle color
circle.colorFromText = "GUARAM"
//Use custom color scheme
circle.COLOR_SCHEME = [ 0xffe57373, 0xfff06292 ...]
//Generate color based on text or user defined parameter
circle.useTextColor = true;
//If useTextColor == false - this value will be used for circle color
circle.circleColor = UIColor.blue
//Change text color
circle.textColor = UIColor.white
//Padding of inner text
circle.padding = 0.3
//Amount of lines
circle!.amountLines = 1
```
## Author
Gio Andriadze, g.andriadze2@gmail.com
## License
CircleLabel is available under the MIT license. See the LICENSE file for more info.