12345678910111213141516171819202122232425262728293031323334353637383940 |
- //
- // UIBarButtonItem+Badge.h
- // therichest
- //
- // Created by Mike on 2014-05-05.
- // Copyright (c) 2014 Valnet Inc. All rights reserved.
- //
- //
- // https://github.com/mikeMTOL/UIBarButtonItem-Badge
- //
- // SPDX-FileCopyrightText: 2014 Mike, Valnet Inc.
- // SPDX-License-Identifier: MIT
- #import <UIKit/UIKit.h>
- @interface UIBarButtonItem (Badge)
- @property (strong, atomic) 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
|