RMDownloadIndicator.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // RMDownloadIndicator.h
  3. // BezierLoaders
  4. //
  5. // Created by Mahesh on 1/30/14.
  6. // Copyright (c) 2014 Mahesh. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. typedef enum {
  10. kRMClosedIndicator=0,
  11. kRMFilledIndicator,
  12. kRMMixedIndictor,
  13. }RMIndicatorType;
  14. @interface RMDownloadIndicator : UIView
  15. // this value should be 0 to 0.5 (default: (kRMFilledIndicator = 0.5), (kRMMixedIndictor = 0.4))
  16. @property(nonatomic, assign)CGFloat radiusPercent;
  17. // used to fill the downloaded percent slice (default: (kRMFilledIndicator = white), (kRMMixedIndictor = white))
  18. @property(nonatomic, strong)UIColor *fillColor;
  19. // used to stroke the covering slice (default: (kRMClosedIndicator = white), (kRMMixedIndictor = white))
  20. @property(nonatomic, strong)UIColor *strokeColor;
  21. // used to stroke the background path the covering slice (default: (kRMClosedIndicator = gray))
  22. @property(nonatomic, strong)UIColor *closedIndicatorBackgroundStrokeColor;
  23. // init with frame and type
  24. // if() - (id)initWithFrame:(CGRect)frame is used the default type = kRMFilledIndicator
  25. - (id)initWithFrame:(CGRect)frame type:(RMIndicatorType)type;
  26. // prepare the download indicator
  27. - (void)loadIndicator;
  28. // update the downloadIndicator
  29. - (void)setIndicatorAnimationDuration:(CGFloat)duration;
  30. // update the downloadIndicator
  31. - (void)updateWithTotalBytes:(CGFloat)bytes downloadedBytes:(CGFloat)downloadedBytes;
  32. @end