RITLPhotosCell.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //
  2. // YPPhotosCell.h
  3. // RITLPhotoDemo
  4. //
  5. // Created by YueWen on 16/7/14.
  6. // Copyright © 2017年 YueWen. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. @class PHAsset;
  10. @class RITLPhotosCell;
  11. NS_ASSUME_NONNULL_BEGIN
  12. typedef NS_ENUM(NSUInteger,RITLPhotosCellAnimatedStatus){
  13. RITLPhotosCellAnimatedStatusPermit//允许使用动画
  14. };
  15. typedef void(^RITLPhotosCellStatusAction)(RITLPhotosCellAnimatedStatus,BOOL,NSUInteger);
  16. @protocol RITLPhotosCellActionTarget <NSObject>
  17. @optional
  18. /**
  19. 上方的响应按钮被点击
  20. action必须调用
  21. */
  22. - (void)photosCellDidTouchUpInSlide:(RITLPhotosCell *)cell
  23. asset:(PHAsset *)asset
  24. indexPath:(NSIndexPath *)indexPath
  25. complete:(RITLPhotosCellStatusAction)animated;
  26. @end
  27. @interface RITLPhotosCell : UICollectionViewCell
  28. /// 响应源
  29. @property (nonatomic, weak, nullable)id <RITLPhotosCellActionTarget> actionTarget;
  30. /// 显示照片的视图
  31. @property (strong, nonatomic) IBOutlet UIImageView *imageView;
  32. /// 展示视频出现的信息搭载视图,默认为隐藏
  33. @property (strong, nonatomic) IBOutlet UIView *messageView;
  34. /// 显示索引的标签
  35. @property (strong, nonatomic) IBOutlet UILabel *indexLabel;
  36. /// 展示视频时的录像小图标
  37. @property (strong, nonatomic) IBOutlet UIImageView *messageImageView;
  38. /// 展示视频时长的小标签
  39. @property (strong, nonatomic) IBOutlet UILabel *messageLabel;
  40. /// 支持iOS9.1之后的livePhoto
  41. @property (nonatomic, strong) UIImageView *liveBadgeImageView;
  42. /// 负责显示选中的按钮
  43. @property (strong, nonatomic) UIButton *chooseButton;
  44. /// 不能点击进行的遮罩层
  45. @property (nonatomic, strong, readonly)UIView *shadeView;
  46. @property (nonatomic, weak, nullable) PHAsset *asset;
  47. @property (nonatomic, strong, nullable) NSIndexPath *indexPath;
  48. @end
  49. NS_ASSUME_NONNULL_END