TZPhotoPreviewCell.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //
  2. // TZPhotoPreviewCell.h
  3. // TZImagePickerController
  4. //
  5. // Created by 谭真 on 15/12/24.
  6. // Copyright © 2015年 谭真. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class TZAssetModel;
  10. @interface TZAssetPreviewCell : UICollectionViewCell
  11. @property (nonatomic, strong) TZAssetModel *model;
  12. @property (nonatomic, copy) void (^singleTapGestureBlock)(void);
  13. - (void)configSubviews;
  14. - (void)photoPreviewCollectionViewDidScroll;
  15. @end
  16. @class TZAssetModel,TZProgressView,TZPhotoPreviewView;
  17. @interface TZPhotoPreviewCell : TZAssetPreviewCell
  18. @property (nonatomic, copy) void (^imageProgressUpdateBlock)(double progress);
  19. @property (nonatomic, strong) TZPhotoPreviewView *previewView;
  20. @property (nonatomic, assign) BOOL allowCrop;
  21. @property (nonatomic, assign) CGRect cropRect;
  22. @property (nonatomic, assign) BOOL scaleAspectFillCrop;
  23. - (void)recoverSubviews;
  24. @end
  25. @interface TZPhotoPreviewView : UIView
  26. @property (nonatomic, strong) UIImageView *imageView;
  27. @property (nonatomic, strong) UIScrollView *scrollView;
  28. @property (nonatomic, strong) UIView *imageContainerView;
  29. @property (nonatomic, strong) TZProgressView *progressView;
  30. @property (nonatomic, assign) BOOL allowCrop;
  31. @property (nonatomic, assign) CGRect cropRect;
  32. @property (nonatomic, assign) BOOL scaleAspectFillCrop;
  33. @property (nonatomic, strong) TZAssetModel *model;
  34. @property (nonatomic, strong) id asset;
  35. @property (nonatomic, copy) void (^singleTapGestureBlock)(void);
  36. @property (nonatomic, copy) void (^imageProgressUpdateBlock)(double progress);
  37. @property (nonatomic, assign) int32_t imageRequestID;
  38. - (void)recoverSubviews;
  39. @end
  40. @class AVPlayer, AVPlayerLayer;
  41. @interface TZVideoPreviewCell : TZAssetPreviewCell
  42. @property (strong, nonatomic) AVPlayer *player;
  43. @property (strong, nonatomic) AVPlayerLayer *playerLayer;
  44. @property (strong, nonatomic) UIButton *playButton;
  45. @property (strong, nonatomic) UIImage *cover;
  46. @property (nonatomic, strong) NSURL *videoURL;
  47. - (void)pausePlayerAndShowNaviBar;
  48. @end
  49. @interface TZGifPreviewCell : TZAssetPreviewCell
  50. @property (strong, nonatomic) TZPhotoPreviewView *previewView;
  51. @end