ShowImageView.m 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. //
  2. // ShowImageView.m
  3. // VclustersGemini
  4. //
  5. // Created by APPLE on 2019/10/10.
  6. // Copyright © 2019 APPLE. All rights reserved.
  7. //
  8. #import "ShowImageView.h"
  9. #import "RCCommandHelp.h"
  10. @interface ShowImageView ()
  11. {
  12. }
  13. @end
  14. @implementation ShowImageView
  15. @synthesize delegate;
  16. @synthesize isLan;
  17. - (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
  18. {
  19. NSInteger touchCount = [[event allTouches] count];/*手指事件个数*/
  20. /*当前活动手势 在touches中 关联事件个数在event中*/
  21. for (UITouch *touch in touches)
  22. {
  23. NSString *dataStr = [RCCommandHelp tapDownCommandTouches:touch touchCount:touchCount showImageView:self isLan:isLan];
  24. // HLog(@"\n---touchesBegan = %@----",dataStr);
  25. if ([delegate respondsToSelector:@selector(showImageViewtouchesBeganCommondStr:)])
  26. {
  27. [delegate showImageViewtouchesBeganCommondStr:dataStr];
  28. }
  29. }
  30. }
  31. - (void)touchesEnded:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
  32. {
  33. NSInteger touchCount = [[event allTouches] count];/*手指事件个数*/
  34. /*当前活动手势 在touches中 关联事件个数在event中*/
  35. for (UITouch *touch in touches)
  36. {
  37. NSString *dataStr = [RCCommandHelp tapUpCommandTouches:touch touchCount:touchCount showImageView:self isLan:isLan];
  38. // HLog(@"\n---touchesEnded = %@----",dataStr);
  39. if ([delegate respondsToSelector:@selector(showImageViewtouchesEndedCommondStr:)])
  40. {
  41. [delegate showImageViewtouchesEndedCommondStr:dataStr];
  42. }
  43. }
  44. }
  45. - (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
  46. {
  47. NSInteger touchCount = [[event allTouches] count];/*手指事件个数*/
  48. /*当前活动手势 在touches中 关联事件个数在event中*/
  49. for (UITouch *touch in touches)
  50. {
  51. NSString *dataStr = [RCCommandHelp tapMoveCommandTouches:touch touchCount:touchCount showImageView:self isLan:isLan];
  52. // HLog(@"\n---touchesMoved = %@----",dataStr);
  53. if ([delegate respondsToSelector:@selector(showImageViewtouchesMovedCommondStr:)])
  54. {
  55. [delegate showImageViewtouchesMovedCommondStr:dataStr];
  56. }
  57. }
  58. }
  59. - (void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
  60. {
  61. NSInteger touchCount = [[event allTouches] count];/*手指事件个数*/
  62. /*当前活动手势 在touches中 关联事件个数在event中*/
  63. for (UITouch *touch in touches)
  64. {
  65. NSString *dataStr = [RCCommandHelp tapUpCommandTouches:touch touchCount:touchCount showImageView:self isLan:isLan];
  66. // HLog(@"\n---touchesCancelled = %@----",dataStr);
  67. if ([delegate respondsToSelector:@selector(showImageViewtouchesCancelledCommondStr:)])
  68. {
  69. [delegate showImageViewtouchesCancelledCommondStr:dataStr];
  70. }
  71. }
  72. }
  73. @end