SignatureView.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // SignatureView.h
  3. // SignatureView
  4. //
  5. // Created by Michal Konturek on 05/05/2014.
  6. // Copyright (c) 2014 Michal Konturek. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #import <GLKit/GLKit.h>
  10. //@interface SignatureView : UIImageView
  11. //
  12. //
  13. //@property CGRect boundary;
  14. //@property (nonatomic, strong) UILongPressGestureRecognizer *recognizer;
  15. //
  16. //- (void)setLineColor:(UIColor *)color;
  17. //
  18. //- (void)clearWithColor:(UIColor *)color;
  19. //
  20. //
  21. //- (BOOL)isSigned;
  22. //
  23. //@end
  24. //typedef void(^OkClick)(void);
  25. #define MAX_LINEWIDTH 12
  26. @interface SignatureView : GLKView
  27. @property (nonatomic, strong) UIColor *foregroundLineColor;
  28. @property (nonatomic, strong) UIColor *backgroundLineColor;
  29. @property (nonatomic, assign) CGFloat foregroundLineWidth;
  30. @property (nonatomic, assign) CGFloat backgroundLineWidth;
  31. @property (nonatomic, assign) CGFloat MaxLineWidth;
  32. @property (nonatomic, assign) CGFloat MinLineWidth;
  33. @property (assign, nonatomic) UIColor *strokeColor;
  34. @property (assign, nonatomic) BOOL isSigned;
  35. //@property (strong, nonatomic) UIImage *signatureImage;
  36. - (UIImage *)signatureImage;
  37. - (NSData *)signatureData;
  38. - (void)setLineWidth:(CGFloat)width;
  39. //@property(nonatomic,copy)OkClick okClick;
  40. // 清除
  41. - (void)clear;
  42. @end