forked from matteogobbi/UIView-MGBadgeView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUIView+MGBadgeView.h
54 lines (33 loc) · 1.06 KB
/
UIView+MGBadgeView.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//
// UIView+MGBadgeView.h
// purl
//
// Created by Matteo Gobbi on 28/05/2014.
// Copyright (c) 2014 Matteo Gobbi (Voxygen). All rights reserved.
//
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, MGBadgePosition) {
MGBadgePositionCenterLeft,
MGBadgePositionCenterRight,
MGBadgePositionTopLeft,
MGBadgePositionTopRight,
MGBadgePositionBottomLeft,
MGBadgePositionBottomRight,
MGBadgePositionBest
};
@interface MGBadgeView : UIView
@property (nonatomic) MGBadgePosition position;
@property (nonatomic) NSInteger badgeValue;
@property(strong, nonatomic) UIFont *font;
@property(strong, nonatomic) UIColor *badgeColor;
@property(strong, nonatomic) UIColor *textColor;
@property(strong, nonatomic) UIColor *outlineColor;
@property (nonatomic) float outlineWidth;
@property (nonatomic) float minDiameter;
@property (nonatomic) BOOL displayIfZero;
@property (nonatomic) float horizontalOffset;
@property (nonatomic) float verticalOffset;
@end
@interface UIView (MGBadgeView)
@property(nonatomic, readonly) MGBadgeView *badgeView;
@end