forked from mikeMTOL/UIBarButtonItem-Badge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UIButton+Badge.h
35 lines (30 loc) · 1006 Bytes
/
UIButton+Badge.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//
// UIBarButtonItem+Badge.h
// therichest
//
// Created by Mike on 2014-05-05.
// Copyright (c) 2014 Valnet Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIButton (Badge)
@property (strong, nonatomic) UILabel *badge;
// Badge value to be display
@property (nonatomic) NSString *badgeValue;
// Badge background color
@property (nonatomic) UIColor *badgeBGColor;
// Badge text color
@property (nonatomic) UIColor *badgeTextColor;
// Badge font
@property (nonatomic) UIFont *badgeFont;
// Padding value for the badge
@property (nonatomic) CGFloat badgePadding;
// Minimum size badge to small
@property (nonatomic) CGFloat badgeMinSize;
// Values for offseting the badge over the BarButtonItem you picked
@property (nonatomic) CGFloat badgeOriginX;
@property (nonatomic) CGFloat badgeOriginY;
// In case of numbers, remove the badge when reaching zero
@property BOOL shouldHideBadgeAtZero;
// Badge has a bounce animation when value changes
@property BOOL shouldAnimateBadge;
@end