This component will allow you to put an iOS Badge-like everywhere in your application. So it is now not limited to the UITabBar or to the application icon.
You can change its color, size, set it to have a shadow or not, and to blink, change its font color and size, etc.
It is actually used on 3 different commercial apps so it fits "Apple recommendations".
Please note that this documentation is included in the package, as well as a sample application.
1) Include both LTBadgesView.h & LTBadgesView.m in your project
2) If you want to use the IB Editor :
Add a UIView to your project that will fit with your badge needs (formerly use twice the height for the width, for example 80x40 pixels), put its color to transparent background and attach its style to LTBadgesView
Declare it as an outlet in you class declaration and access its method to change its value, colors & attributes
3) By code, you can use this kind of declaration :
badge1 = [[LTBadgesView alloc] initWithFrame:CGRectMake(50, 100, 50, 40)];
[badge1 setMainColor:[UIColor redColor]];
[badge1 setValue:@"1"];
[badge1 setTextSize:18];
[badge1 setHighlightColor:[UIColor colorWithRed:0.1 green:0.1 blue:0.1 alpha:1.0]];
[self.view addSubview:badge1];
Available methods :
- (void)setBlinking:(BOOL)isBlinking;
- (void)setHighlighted:(BOOL)isHighlighted;
- (void)setBadgeSize:(LTBadgeSize)size;
- (void)setValue:(NSString *)newValue;
- (void)setMainColor:(UIColor *)newColor;
- (void)setHighlightColor:(UIColor *)newColor;
- (void)setBorderColor:(UIColor *)newColor;
- (void)setShadowVisible:(BOOL)visible;
- (void)setTextColor:(UIColor *)newColor;
- (void)setTextSize:(CGFloat)newSize;
Works well! Integrated in just minutes.
This is an excellent software product that easily allows one to generate badges of any color and size. There are many badge attribute-changing methods that are supported in this class, which makes the badge generation very flexible. It was simple to integrate into my project and certainly met my needs. Additional enhancement suggestions were quickly addressed by the developer in a kind and courteous manner, which was greatly appreciated.
This is an excellent component, and very flexible. I had one issue, and the developer addressed my issue quickly, and ingeniously. I would recommend this component whole-heartedly.
Questions & Comments