-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
Copy pathJDStatusBarStyle.h
executable file
·92 lines (72 loc) · 3.43 KB
/
JDStatusBarStyle.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
//
// JDStatusBarStyle.h
// JDStatusBarNotificationExample
//
// Created by Markus on 04.12.13.
// Copyright (c) 2013 Markus. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
/// This style has a red background with a white Helvetica label.
extern NSString *const JDStatusBarStyleError;
/// This style has a yellow background with a gray Helvetica label.
extern NSString *const JDStatusBarStyleWarning;
/// This style has a green background with a white Helvetica label.
extern NSString *const JDStatusBarStyleSuccess;
/// This style has a black background with a green bold Courier label.
extern NSString *const JDStatusBarStyleMatrix;
/// This style has a white background with a gray Helvetica label.
extern NSString *const JDStatusBarStyleDefault;
/// This style has a nearly black background with a nearly white Helvetica label.
extern NSString *const JDStatusBarStyleDark;
typedef NS_ENUM(NSInteger, JDStatusBarAnimationType) {
/// Notification won't animate
JDStatusBarAnimationTypeNone,
/// Notification will move in from the top, and move out again to the top
JDStatusBarAnimationTypeMove,
/// Notification will fall down from the top and bounce a little bit
JDStatusBarAnimationTypeBounce,
/// Notification will fade in and fade out
JDStatusBarAnimationTypeFade,
};
typedef NS_ENUM(NSInteger, JDStatusBarProgressBarPosition) {
/// progress bar will be at the bottom of the status bar
JDStatusBarProgressBarPositionBottom,
/// progress bar will be at the center of the status bar
JDStatusBarProgressBarPositionCenter,
/// progress bar will be at the top of the status bar
JDStatusBarProgressBarPositionTop,
/// progress bar will be below the status bar (the progress bar won't move with the status bar in this case)
JDStatusBarProgressBarPositionBelow,
/// progress bar will be below the navigation bar (the progress bar won't move with the status bar in this case)
JDStatusBarProgressBarPositionNavBar,
};
/**
* A Style defines the appeareance of a notification.
*/
@interface JDStatusBarStyle : NSObject <NSCopying>
/// The background color of the notification bar
@property (nonatomic, strong) UIColor *barColor;
/// The text color of the notification label
@property (nonatomic, strong) UIColor *textColor;
/// The text shadow of the notification label
@property (nonatomic, strong) NSShadow *textShadow;
/// The font of the notification label
@property (nonatomic, strong) UIFont *font;
/// A correction of the vertical label position in points. Default is 0.0
@property (nonatomic, assign) CGFloat textVerticalPositionAdjustment;
#pragma mark Animation
/// The animation, that is used to present the notification
@property (nonatomic, assign) JDStatusBarAnimationType animationType;
#pragma mark Progress Bar
/// The background color of the progress bar (on top of the notification bar)
@property (nonatomic, strong) UIColor *progressBarColor;
/// The height of the progress bar. Default is 1.0
@property (nonatomic, assign) CGFloat progressBarHeight;
/// The position of the progress bar. Default is JDStatusBarProgressBarPositionBottom
@property (nonatomic, assign) JDStatusBarProgressBarPosition progressBarPosition;
/// The insets of the progress bar. Default is 0.0
@property (nonatomic, assign) CGFloat progressBarHorizontalInsets;
/// The corner radius of the progress bar. Default is 0.0
@property (nonatomic, assign) CGFloat progressBarCornerRadius;
@end