PhotoView.h 914 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // PhotoView.h
  3. // ImageBrowser
  4. //
  5. // Created by msk on 16/9/1.
  6. // Copyright © 2016年 msk. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import "FLAnimatedImageView.h"
  10. #import "FLAnimatedImage.h"
  11. @protocol PhotoViewDelegate <NSObject>
  12. /**
  13. * 点击图片时,隐藏图片浏览器
  14. */
  15. -(void)tapHiddenPhotoView;
  16. // 长按保存图片
  17. - (void)longPressPhotoView:(UIImage *)image;
  18. @end
  19. @interface PhotoView : UIView
  20. /** 父视图 */
  21. @property(nonatomic,strong) UIScrollView *scrollView;
  22. /** 图片视图 */
  23. @property(nonatomic, strong) FLAnimatedImageView *imageView;
  24. @property(nonatomic, strong) UIImageView *webPimageView;
  25. /** 代理 */
  26. @property(nonatomic, weak) id<PhotoViewDelegate> delegate;
  27. /**
  28. * 传图片Url
  29. */
  30. -(id)initWithFrame:(CGRect)frame withPhotoUrl:(NSString *)photoUrl;
  31. /**
  32. * 传具体图片
  33. */
  34. -(id)initWithFrame:(CGRect)frame withPhotoImage:(UIImage *)image;
  35. @end