KKImageToolBase.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. //
  2. // KKImageToolBase.h
  3. // WWImageEdit
  4. //
  5. // Created by 邬维 on 2017/1/3.
  6. // Copyright © 2017年 kook. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "KKImageEditorViewController.h"
  10. #import "UIView+Frame.h"
  11. #import "KKImageToolProtocol.h"
  12. #import "KKImageToolInfo.h"
  13. #import "KKImageEditorTheme.h"
  14. static const CGFloat kImageToolAnimationDuration = 0.3; //工具栏平移动画时间
  15. typedef NS_ENUM(NSUInteger,KKToolIndexNumber){
  16. KKToolIndexNumberFirst = 0,
  17. KKToolIndexNumberSecond = 1,
  18. KKToolIndexNumberThird = 2,
  19. KKToolIndexNumberFourth = 3,
  20. KKToolIndexNumberFifth = 4,
  21. };
  22. /**
  23. 图片工具类 基类
  24. */
  25. @interface KKImageToolBase : NSObject<KKImageToolProtocol>
  26. @property (nonatomic, weak) KKImageEditorViewController *editor; //图片编辑vc
  27. @property (nonatomic, weak) KKImageToolInfo *toolInfo; //工具信息
  28. - (id)initWithImageEditor:(KKImageEditorViewController*)editor withToolInfo:(KKImageToolInfo *)info;
  29. /**
  30. 初始化工具信息
  31. */
  32. - (void)setup;
  33. /**
  34. 取消修改
  35. */
  36. - (void)cleanup;
  37. /**
  38. 保存修改
  39. */
  40. - (void)executeWithCompletionBlock:(void(^)(UIImage *image, NSError *error, NSDictionary *userInfo))completionBlock;
  41. @end