新增 Banner 手势优化实施总结文档,记录了在 RoomAnimationView 中对 banner 手势系统的优化过程,包括手势识别器的重新设计、区域划分逻辑、tap 手势处理逻辑及交互区域检查等。同时,优化了多个视图中的通知处理逻辑,确保手势事件的准确传递与处理,提升用户交互体验。

This commit is contained in:
edwinQQQ
2025-08-15 19:34:25 +08:00
parent 84e146277a
commit 3f97b0293e
11 changed files with 871 additions and 910 deletions

View File

@@ -9,6 +9,16 @@
// MARK:
@implementation XPRoomAnimationHitView
//- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
// for (NSInteger i = (self.subviews.count - 1) ; i >= 0 ; i--) {
// UIView * subView = [self.subviews xpSafeObjectAtIndex:i];
// CGPoint convertPoint = [subView convertPoint:point fromView:self];
// if (CGRectContainsPoint(subView.bounds, convertPoint)) {
// return [subView hitTest:convertPoint withEvent:event];
// }
// }
// return nil;
//}
- (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
@@ -17,11 +27,6 @@
return nil;
}
// bounds
// if (!CGRectContainsPoint(self.bounds, point)) {
// return nil;
// }
//
for (NSInteger i = self.subviews.count - 1; i >= 0; i--) {
UIView *subView = [self.subviews xpSafeObjectAtIndex:i];
@@ -35,7 +40,8 @@
}
}
//
// nil
//
return nil;
}