UIView+gesture.h 497 B

12345678910111213141516171819202122
  1. //
  2. // UIView+gesture.h
  3. //
  4. // Created by CHD on 2018/5/8.
  5. // Copyright © 2018年 chd. All rights reserved.
  6. //
  7. #import <UIKit/UIKit.h>
  8. typedef void (^GestureActionBlock)(UIGestureRecognizer *gestureRecoginzer);
  9. @interface UIView (gesture)
  10. /**
  11. * @brief 添加tap手势
  12. * @param block 代码块
  13. */
  14. - (void)addTapActionWithBlock:(GestureActionBlock)block;
  15. /**
  16. * @brief 添加长按手势
  17. * @param block 代码块
  18. */
  19. - (void)addLongPressActionWithBlock:(GestureActionBlock)block;
  20. @end