https://github.com/yonat/badgelabel
Simple animatable badge, based on UILabel and using CALayer
https://github.com/yonat/badgelabel
Last synced: about 1 year ago
JSON representation
Simple animatable badge, based on UILabel and using CALayer
- Host: GitHub
- URL: https://github.com/yonat/badgelabel
- Owner: yonat
- License: mit
- Created: 2012-02-08T05:50:37.000Z (over 14 years ago)
- Default Branch: master
- Last Pushed: 2019-05-31T19:44:34.000Z (about 7 years ago)
- Last Synced: 2025-04-14T15:57:14.884Z (about 1 year ago)
- Language: Objective-C
- Homepage:
- Size: 20.5 KB
- Stars: 49
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README

## Simple Animatable Badge based on UILabel using CALayer-s
```objective-c
BadgeLabel *badge = [BadgeLabel new];
badge.text = @"42";
```
Easily configure appearance:
```objective-c
badge.backgroundColor = [UIColor blueColor];
badge.hasBorder = YES;
badge.hasGloss = NO;
```
Includes two classes:
**BadgeLabel** - UILabel-derived badge, either Mail.app style gray, or app icon style red with border and gloss, or any other color and style combination.
**BadgeTableViewCell** - a UITableViewCell with a Mail.app style badge.
Unlike CoreGraphics based badges, this badge class can allows the flexibility and power of CoreAnimation layers - run the demo app to see how easy it is.
**Note**: To use BadgeLabel you need to link QuartzCore.framework .