Advertisement
Guest User

Untitled

a guest
Dec 9th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. //
  2. // UIView+ExpandedHitZone.h
  3. // HitTestDemo
  4. //
  5. // Created by Mon on 08/12/2016.
  6. // Copyright © 2016 wenyongyang. All rights reserved.
  7. //
  8.  
  9. #import <UIKit/UIKit.h>
  10.  
  11. @interface UIView (ExpandedHitZone)
  12.  
  13. /**
  14. 被调整的宽度,增量
  15. 增大时需小于0
  16. */
  17. @property (nonatomic, assign) CGFloat dx;
  18.  
  19.  
  20. /**
  21. 被调整的高度,增量
  22. 增大时需小于0
  23. */
  24. @property (nonatomic, assign) CGFloat dy;
  25.  
  26.  
  27. /**
  28. 初始化响应区域被扩大或缩小的 view
  29.  
  30. @param dx 被扩大的宽度,按照一边计算
  31. @param dy 被扩大的高度,按照一边计算
  32. @return 响应区域调整的 view
  33. */
  34. - (instancetype)initWithDx:(CGFloat)dx dy:(CGFloat)dy;
  35.  
  36. @end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement