TZAssetCell.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. //
  2. // TZAssetCell.h
  3. // TZImagePickerController
  4. //
  5. // Created by 谭真 on 15/12/24.
  6. // Copyright © 2015年 谭真. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import <Photos/Photos.h>
  10. typedef enum : NSUInteger {
  11. TZAssetCellTypePhoto = 0,
  12. TZAssetCellTypeLivePhoto,
  13. TZAssetCellTypePhotoGif,
  14. TZAssetCellTypeVideo,
  15. TZAssetCellTypeAudio,
  16. } TZAssetCellType;
  17. @class TZAssetModel;
  18. @interface TZAssetCell : UICollectionViewCell
  19. @property (weak, nonatomic) UIButton *selectPhotoButton;
  20. @property (weak, nonatomic) UIButton *cannotSelectLayerButton;
  21. @property (nonatomic, strong) TZAssetModel *model;
  22. @property (assign, nonatomic) NSInteger index;
  23. @property (nonatomic, copy) void (^didSelectPhotoBlock)(BOOL);
  24. @property (nonatomic, copy) void (^didLongPressPhotoBlock)(TZAssetModel * model);
  25. @property (nonatomic, assign) TZAssetCellType type;
  26. @property (nonatomic, assign) BOOL allowPickingGif;
  27. @property (nonatomic, assign) BOOL allowPickingMultipleVideo;
  28. @property (nonatomic, copy) NSString *representedAssetIdentifier;
  29. @property (nonatomic, assign) int32_t imageRequestID;
  30. @property (nonatomic, strong) UIImage *photoSelImage;
  31. @property (nonatomic, strong) UIImage *photoDefImage;
  32. @property (nonatomic, assign) BOOL showSelectBtn;
  33. @property (nonatomic, assign) BOOL showCheckImageView;
  34. @property (assign, nonatomic) BOOL allowPreview;
  35. - (void)toggleCheck:(BOOL)state;
  36. @property (nonatomic, copy) void (^assetCellDidSetModelBlock)(TZAssetCell *cell, UIImageView *imageView, UIImageView *selectImageView, UILabel *indexLabel, UIView *bottomView, UILabel *timeLength, UIImageView *videoImgView);
  37. @property (nonatomic, copy) void (^assetCellDidLayoutSubviewsBlock)(TZAssetCell *cell, UIImageView *imageView, UIImageView *selectImageView, UILabel *indexLabel, UIView *bottomView, UILabel *timeLength, UIImageView *videoImgView);
  38. @end
  39. @class TZAlbumModel;
  40. @interface TZAlbumCell : UITableViewCell
  41. @property (nonatomic, strong) TZAlbumModel *model;
  42. @property (weak, nonatomic) UIButton *selectedCountButton;
  43. @property (nonatomic, copy) void (^albumCellDidSetModelBlock)(TZAlbumCell *cell, UIImageView *posterImageView, UILabel *titleLabel);
  44. @property (nonatomic, copy) void (^albumCellDidLayoutSubviewsBlock)(TZAlbumCell *cell, UIImageView *posterImageView, UILabel *titleLabel);
  45. @end
  46. @interface TZAssetCameraCell : UICollectionViewCell
  47. @property (nonatomic, strong) UIImageView *imageView;
  48. @end