LDPostVCbtnView.m 603 B

1234567891011121314151617181920212223242526
  1. //
  2. // LDPostVCbtnView.m
  3. // jiaPei
  4. //
  5. // Created by EchoShacolee on 2018/3/29.
  6. // Copyright © 2018年 JCZ. All rights reserved.
  7. //
  8. #import "LDPostVCbtnView.h"
  9. @implementation LDPostVCbtnView
  10. -(UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event{
  11. UIView *view = [super hitTest:point withEvent:event];
  12. if (view == nil && self.subviews.count != 0) {
  13. UIView *btn = self.subviews[0];
  14. CGPoint temPoint = [btn convertPoint:point fromView:self];
  15. if (CGRectContainsPoint(btn.bounds, temPoint)) {
  16. view = btn;
  17. }
  18. }
  19. return view;
  20. }
  21. @end