Badges View for iOS

Badges View for iOS

Badges View, a component to show badges everywhere on your application

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".

Hide

Documentation

Please note that this documentation is included in the package, as well as a sample application.

How to use :

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;

  • Set to YES or NO to start or stop blinking

- (void)setHighlighted:(BOOL)isHighlighted;

  • Set to YES or NO to highlight the Badge. Please note that Blinking mode uses the highlight color.

- (void)setBadgeSize:(LTBadgeSize)size;

  • Deprecated, will be removed on version 2.3 as it now uses the height of the view to get its size

- (void)setValue:(NSString *)newValue;

  • Set the value to be displayed on the badge

- (void)setMainColor:(UIColor *)newColor;

  • Set the main color of the badge (default is red)

- (void)setHighlightColor:(UIColor *)newColor;

  • Set the highlight color of the badge

- (void)setBorderColor:(UIColor *)newColor;

  • Set the border color of the badge (default is white)

- (void)setShadowVisible:(BOOL)visible;

  • Set YES or NO to specify if the badge will have a shadow

- (void)setTextColor:(UIColor *)newColor;

  • Set the color of the text

- (void)setTextSize:(CGFloat)newSize;

  • Set the size of the text
You need to log-in or create an account
  • Create an account
  • Log-in

Please use your real name.

Activation link will be sent to this address.

Minimum 8 characters

Enter your password again

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

X

Save your watchlist

Fill your details below to receive project updates from your watch list - including new versions, price changes and discounts.

I agree to the terms of use and privacy policy.

2 licenses, starting from From » $9.99 View Licenses 14 day money-back guarantee
  • Works well! Integrated in just minutes.
    LP Lane Phillips
    1 year ago, 0 comments
    Was this helpful?
    Flag
  • 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.
    RL Randy Linebarger
    1 year ago, 0 comments
    Was this helpful?
    Flag
  • 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.
    SL Scott Lockwood
    2 years ago, 0 comments
    Was this helpful?
    Flag
Post a comment

Or enter your name and Email
No comments have been posted yet.