JhtDownloadView.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. //
  2. // JhtDownloadView.h
  3. // JhtDocViewerDemo
  4. //
  5. // GitHub主页: https://github.com/jinht
  6. // CSDN博客: http://blog.csdn.net/anticipate91
  7. //
  8. // Created by Jht on 2017/1/5.
  9. // Copyright © 2017年 JhtDocViewer. All rights reserved.
  10. //
  11. #import <UIKit/UIKit.h>
  12. @class JhtFileModel;
  13. /** 展示下载 View */
  14. @interface JhtDownloadView : UIView
  15. #pragma mark - property
  16. #pragma mark optional
  17. /** 文件类型图片 */
  18. @property (nonatomic, strong) UIImageView *iconFileImageView;
  19. /** 文件名称 Label */
  20. @property (nonatomic, strong) UILabel *iconFileDescribeLabel;
  21. /** 下载进度文案 Label */
  22. @property (nonatomic, strong) UILabel *downloadingStateLabel;
  23. /** 下载进度条填充颜色
  24. * default: UIColorFromRGB(0x61CBF5)
  25. */
  26. @property (nonatomic, strong) UIColor *downloadProgressTintColor;
  27. /** 进度条 */
  28. @property (nonatomic, strong) UIProgressView *fileProgressView;
  29. /** 关闭按钮 */
  30. @property (nonatomic, strong) UIButton *closeBtn;
  31. /** 下载按钮 */
  32. @property (nonatomic, strong) UIButton *downloadBtn;
  33. /** 文件正在下载中的提示语
  34. * default: @"玩命加载中..."
  35. */
  36. @property (nonatomic, strong) NSString *downloadingHint;
  37. /** 无网络连接提示语
  38. * default: @"当前网络暂不可用,请检查网络设置"
  39. */
  40. @property (nonatomic, strong) NSString *lostNetHint;
  41. #pragma mark - Public Method
  42. /** 初始化
  43. * downloadingHint: 文件正在下载 提示语
  44. * lostNetHint: 无网络连接 提示语
  45. * downloadProgressTintColor: 下载进度条 颜色
  46. * model: 用于下载 文件model
  47. */
  48. - (id)initWithFrame:(CGRect)frame downloadingHint:(NSString *)downloadingHint lostNetHint:(NSString *)lostNetHint downloadProgressTintColor:(UIColor *)downloadProgressTintColor fileModel:(JhtFileModel *)model;
  49. typedef void(^clickBlock)(NSInteger index);
  50. /** 点击按钮回调的block 0: 重新加载,1: 点击关闭 */
  51. - (void)clickBtnBlock:(clickBlock)block;
  52. @end