CommonEditorTableContainerView.m 926 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // CommonEditorTableContainerView.m
  3. // iSales-NPD
  4. //
  5. // Created by Jack on 2017/11/22.
  6. // Copyright © 2017年 United Software Applications, Inc. All rights reserved.
  7. //
  8. #import "CommonEditorTableContainerView.h"
  9. @implementation CommonEditorTableContainerView
  10. /*
  11. // Only override drawRect: if you perform custom drawing.
  12. // An empty implementation adversely affects performance during animation.
  13. - (void)drawRect:(CGRect)rect {
  14. // Drawing code
  15. }
  16. */
  17. - (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event {
  18. // 首先确定点击是否在自己区域
  19. if (CGRectContainsPoint(self.bounds, point)) {
  20. return YES;
  21. }
  22. // 然后确定点击是否在自视图区域
  23. for (UIView *subView in self.subviews) {
  24. CGRect frame = subView.frame;
  25. if (CGRectContainsPoint(frame, point)) {
  26. return YES;
  27. }
  28. }
  29. return NO;
  30. }
  31. @end