// // YMRoomAnimationBaseView.m // YUMI // // Created by YUMI on 2021/11/22. // #import "XPRoomAnimationHitView.h" #import "NSArray+Safe.h" @implementation XPRoomAnimationHitView - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event { for (NSInteger i = (self.subviews.count - 1) ; i >= 0 ; i--) { UIView * subView = [self.subviews safeObjectAtIndex1:i]; CGPoint convertPoint = [subView convertPoint:point fromView:self]; if (CGRectContainsPoint(subView.bounds, convertPoint)) { return [subView hitTest:convertPoint withEvent:event]; } } return nil; } @end