TYMProgressBarView.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. //
  2. // TYMProgressBarView.h
  3. // TYMProgressBarView
  4. //
  5. // Created by Yiming Tang on 13-6-7.
  6. // Copyright (c) 2013 - 2014 Yiming Tang. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. /**
  10. Progress bar similar to the one in iOS's launching screen.
  11. */
  12. @interface TYMProgressBarView : UIView
  13. ///---------------------------
  14. ///@name Managing the Progress
  15. ///---------------------------
  16. /**
  17. The current progress shown by the receiver.
  18. The current progress is represented by a floating-point value between `0.0` and `1.0`, inclusive, where `1.0` indicates
  19. the completion of the task. Values less than `0.0` and greater than `1.0` are pinned to those limits.
  20. The default value is `0.0`.
  21. */
  22. @property (nonatomic, assign) CGFloat progress;
  23. ///-------------------------------------
  24. /// @name Configuring the Appearance
  25. ///-------------------------------------
  26. /**
  27. The border width.
  28. The default is `2.0`.
  29. */
  30. @property (nonatomic, assign) CGFloat barBorderWidth UI_APPEARANCE_SELECTOR;
  31. /**
  32. The border color.
  33. @see defaultBarColor
  34. */
  35. @property (nonatomic, strong) UIColor *barBorderColor UI_APPEARANCE_SELECTOR;
  36. /**
  37. The inner border width.
  38. The default is `0.0`.
  39. */
  40. @property (nonatomic, assign) CGFloat barInnerBorderWidth UI_APPEARANCE_SELECTOR;
  41. /**
  42. The inner border color.
  43. The default is nil.
  44. */
  45. @property (nonatomic, strong) UIColor *barInnerBorderColor UI_APPEARANCE_SELECTOR;
  46. /**
  47. The inner padding.
  48. The default is `2.0`.
  49. */
  50. @property (nonatomic, assign) CGFloat barInnerPadding UI_APPEARANCE_SELECTOR;
  51. /**
  52. The fill color.
  53. @see defaultBarColor
  54. */
  55. @property (nonatomic, strong) UIColor *barFillColor UI_APPEARANCE_SELECTOR;
  56. /**
  57. The bar background color.
  58. The default is white.
  59. */
  60. @property (nonatomic, strong) UIColor *barBackgroundColor UI_APPEARANCE_SELECTOR;
  61. ///---------------
  62. /// @name Defaults
  63. ///---------------
  64. /**
  65. The default value of `barBorderColor` and `barFillColor`.
  66. */
  67. + (UIColor *)defaultBarColor;
  68. @end