Files
peko-ios/YuMi/Modules/YMRoom/View/AnimationView/XPRoomAnimationHitView.m
2023-07-14 18:50:55 +08:00

26 lines
587 B
Objective-C

//
// 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