YYPhotoGroupView.h 1.2 KB

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