iOS: when not set onclick on view, should passthrough touch event
This commit is contained in:
18
doric-iOS/Pod/Classes/Shader/DoricUIView.m
Normal file
18
doric-iOS/Pod/Classes/Shader/DoricUIView.m
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Created by pengfei.zhou on 2022/12/6.
|
||||
//
|
||||
|
||||
#import "DoricUIView.h"
|
||||
|
||||
|
||||
@implementation DoricUIView
|
||||
- (nullable UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event {
|
||||
UIView *target = [super hitTest:point withEvent:event];
|
||||
if (self.gestureRecognizers.count == 0 && target == self) {
|
||||
return nil;
|
||||
} else {
|
||||
return target;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user