SLImageZoomView.h 739 B

123456789101112131415161718192021222324252627282930
  1. //
  2. // SLScrollView.h
  3. //
  4. // Created by wsl on 2019/10/27.
  5. // Copyright © 2019 wsl. All rights reserved.
  6. //
  7. #import <UIKit/UIKit.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. @protocol SLImageZoomViewDelegate;
  10. /// 缩放视图 用于图片编辑
  11. @interface SLImageZoomView : UIScrollView
  12. @property (nonatomic, strong) UIImage *image;
  13. //
  14. @property (nonatomic, strong) UIImageView *imageView;
  15. @property (nonatomic, weak) id<SLImageZoomViewDelegate> zoomViewDelegate;
  16. @end
  17. /// 缩放视图代理
  18. @protocol SLImageZoomViewDelegate <NSObject>
  19. @optional
  20. /// 开始移动图像位置
  21. - (void)zoomViewDidBeginMoveImage:(SLImageZoomView *)zoomView;
  22. /// 结束移动图像
  23. - (void)zoomViewDidEndMoveImage:(SLImageZoomView *)zoomView;
  24. @end
  25. NS_ASSUME_NONNULL_END