JXImageView.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //
  2. // JXImageView.h
  3. // textScr
  4. //
  5. // Created by JK PENG on 11-8-17.
  6. // Copyright 2011年 Devdiv. All rights reserved.
  7. //
  8. #import <UIKit/UIKit.h>
  9. #define JXImageView_Animation_None 0 //无动画
  10. #define JXImageView_Animation_Line 1 //渐变
  11. #define JXImageView_Animation_More 2 //多变
  12. @class JXImageView;
  13. @protocol JXImageViewPanDelegate <NSObject>
  14. - (void)tapImageView:(JXImageView *)imageView;
  15. - (void)changeWhenPan:(JXImageView *)sender gesture:(UILongPressGestureRecognizer *)gesture;
  16. - (void)getTouchWhenMove:(JXImageView *)imageView withTouch:(NSSet *)touch withEvent:(UIEvent *)event withLongPressGes:(UILongPressGestureRecognizer *)lpGes;
  17. @end
  18. @interface JXImageView : UIImageView {
  19. int _oldAlpha;
  20. BOOL _canChange;
  21. }
  22. //为了先获取图片Size,后设置JXImageview大小,专设的变量
  23. @property (nonatomic) CGSize imageSize;
  24. @property (nonatomic, weak) NSObject* delegate;
  25. @property (nonatomic,weak) id<JXImageViewPanDelegate> panDelegate;
  26. @property (nonatomic, assign) SEL didTouch;
  27. @property (nonatomic, assign) SEL didDragout;
  28. @property (nonatomic, assign) BOOL changeAlpha;
  29. @property (nonatomic, assign) BOOL selected;
  30. @property (nonatomic, assign) BOOL enabled;
  31. @property (nonatomic, assign) int animationType;//动画类型,0:没有;1:渐变;2:多变
  32. @property (nonatomic, strong) UILongPressGestureRecognizer *longPress;
  33. - (void)addTapGesture;
  34. - (void)addLongPressGesture;
  35. @end