// // CommonEditorTableContainerView.m // iSales-NPD // // Created by Jack on 2017/11/22. // Copyright © 2017年 United Software Applications, Inc. All rights reserved. // #import "CommonEditorTableContainerView.h" @implementation CommonEditorTableContainerView /* // Only override drawRect: if you perform custom drawing. // An empty implementation adversely affects performance during animation. - (void)drawRect:(CGRect)rect { // Drawing code } */ - (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event { // 首先确定点击是否在自己区域 if (CGRectContainsPoint(self.bounds, point)) { return YES; } // 然后确定点击是否在自视图区域 for (UIView *subView in self.subviews) { CGRect frame = subView.frame; if (CGRectContainsPoint(frame, point)) { return YES; } } return NO; } @end