JDStatusBarStyle.h 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. //
  2. // JDStatusBarStyle.h
  3. // JDStatusBarNotificationExample
  4. //
  5. // Created by Markus on 04.12.13.
  6. // Copyright (c) 2013 Markus. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <UIKit/UIKit.h>
  10. extern NSString *const JDStatusBarStyleError; /// This style has a red background with a white Helvetica label.
  11. extern NSString *const JDStatusBarStyleWarning; /// This style has a yellow background with a gray Helvetica label.
  12. extern NSString *const JDStatusBarStyleSuccess; /// This style has a green background with a white Helvetica label.
  13. extern NSString *const JDStatusBarStyleMatrix; /// This style has a black background with a green bold Courier label.
  14. extern NSString *const JDStatusBarStyleDefault; /// This style has a white background with a gray Helvetica label.
  15. extern NSString *const JDStatusBarStyleDark; /// This style has a nearly black background with a nearly white Helvetica label.
  16. typedef NS_ENUM(NSInteger, JDStatusBarAnimationType) {
  17. JDStatusBarAnimationTypeNone, /// Notification won't animate
  18. JDStatusBarAnimationTypeMove, /// Notification will move in from the top, and move out again to the top
  19. JDStatusBarAnimationTypeBounce, /// Notification will fall down from the top and bounce a little bit
  20. JDStatusBarAnimationTypeFade /// Notification will fade in and fade out
  21. };
  22. typedef NS_ENUM(NSInteger, JDStatusBarProgressBarPosition) {
  23. JDStatusBarProgressBarPositionBottom, /// progress bar will be at the bottom of the status bar
  24. JDStatusBarProgressBarPositionCenter, /// progress bar will be at the center of the status bar
  25. JDStatusBarProgressBarPositionTop, /// progress bar will be at the top of the status bar
  26. JDStatusBarProgressBarPositionBelow, /// progress bar will be below the status bar (the prograss bar won't move with the statusbar in this case)
  27. JDStatusBarProgressBarPositionNavBar, /// progress bar will be below the navigation bar (the prograss bar won't move with the statusbar in this case)
  28. };
  29. /**
  30. * A Style defines the appeareance of a notification.
  31. */
  32. @interface JDStatusBarStyle : NSObject <NSCopying>
  33. /// The background color of the notification bar
  34. @property (nonatomic, strong) UIColor *barColor;
  35. /// The text color of the notification label
  36. @property (nonatomic, strong) UIColor *textColor;
  37. /// The text shadow of the notification label
  38. @property (nonatomic, strong) NSShadow *textShadow;
  39. /// The font of the notification label
  40. @property (nonatomic, strong) UIFont *font;
  41. /// A correction of the vertical label position in points. Default is 0.0
  42. @property (nonatomic, assign) CGFloat textVerticalPositionAdjustment;
  43. #pragma mark Animation
  44. /// The animation, that is used to present the notification
  45. @property (nonatomic, assign) JDStatusBarAnimationType animationType;
  46. #pragma mark Progress Bar
  47. /// The background color of the progress bar (on top of the notification bar)
  48. @property (nonatomic, strong) UIColor *progressBarColor;
  49. /// The height of the progress bar. Default is 1.0
  50. @property (nonatomic, assign) CGFloat progressBarHeight;
  51. /// The position of the progress bar. Default is JDStatusBarProgressBarPositionBottom
  52. @property (nonatomic, assign) JDStatusBarProgressBarPosition progressBarPosition;
  53. /// The insets of the progress bar. Default is 0.0
  54. @property (nonatomic, assign) CGFloat progressBarHorizontalInsets;
  55. /// The corner radius of the progress bar. Default is 0.0
  56. @property (nonatomic, assign) CGFloat progressBarCornerRadius;
  57. @end