FDPhotoGroupView.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // FDPhotoGroupView.h
  3. // FDFoundationObjC
  4. //
  5. // Created by fandongtongxue on 2020/2/27.
  6. //
  7. #import <UIKit/UIKit.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. /// Single picture's info.
  10. @interface FDPhotoGroupItem : NSObject
  11. @property (nonatomic, strong) UIView *thumbView; ///< thumb image, used for animation position calculation
  12. @property (nonatomic, assign) CGSize largeImageSize;
  13. @property (nonatomic, strong) NSURL *largeImageURL;
  14. @end
  15. /// Used to show a group of images.
  16. /// One-shot.
  17. @interface FDPhotoGroupView : UIView
  18. @property (nonatomic, readonly) NSArray *groupItems; ///< Array<YYPhotoGroupItem>
  19. @property (nonatomic, readonly) NSInteger currentPage;
  20. @property (nonatomic, assign) BOOL blurEffectBackground; ///< Default is YES
  21. - (instancetype)init UNAVAILABLE_ATTRIBUTE;
  22. - (instancetype)initWithFrame:(CGRect)frame UNAVAILABLE_ATTRIBUTE;
  23. + (instancetype)new UNAVAILABLE_ATTRIBUTE;
  24. - (instancetype)initWithGroupItems:(NSArray *)groupItems;
  25. - (void)presentFromImageView:(UIView *)fromView
  26. toContainer:(UIView *)container
  27. animated:(BOOL)animated
  28. completion:(void (^)(void))completion;
  29. - (void)dismissAnimated:(BOOL)animated completion:(void (^)(void))completion;
  30. - (void)dismiss;
  31. @end
  32. NS_ASSUME_NONNULL_END